class SyncTimeline
Defined at line 131 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.h
|SyncTimeline| keeps a monotonously increasing timeline to manage
all the sync fences it creates; The sync device can increase the timeline
value on |SyncTimeline| and let it signal associated fence events so that
clients can be notified.
A Timeline can be depended by both user-space fence events (no matter whether
they are still active) and clients which need to trigger host wait commands,
so both |SyncDevice| and |Fence| hold a RefPtr to the |SyncTimeline| so that
it won't be destroyed until the client breaks the FIDL channel and closed
all the fence event handles.
Public Methods
void SyncTimeline (SyncDevice * parent)
Defined at line 332 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc
void ~SyncTimeline ()
Defined at line 335 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc
zx_status_t Bind (fidl::ServerEnd<fuchsia_hardware_goldfish::SyncTimeline> request)
Defined at line 337 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc
void OnClose (fidl::UnbindInfo info, zx::channel channel)
Defined at line 349 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc
void TriggerHostWait (TriggerHostWaitRequestView request, TriggerHostWaitCompleter::Sync & completer)
|fidl::WireServer
<fuchsia
_hardware_goldfish::SyncTimeline>|
Defined at line 365 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc
void CreateFence (zx::eventpair event, std::optional<uint64_t> seqno)
Create a new sync fence using given |event| and add it to the |fences_|
set.
To handle fence lifetime, we also add an async wait to its parent dispatcher
for |ZX_EVENTPAIR_PEER_CLOSED| signal on |event|. Once the couterpart of
|event| is closed, we'll destroy the Fence instance.
Defined at line 391 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc
void Increase (uint64_t step)
Increase the timeline sequence number, and update all active fences:
If an active fence should be signaled after the timeline increase,
signal the fence event and label it as "inactive".
Defined at line 376 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_device.cc