class ClientSet
Defined at line 30 of file ../../src/graphics/display/drivers/coordinator/client-set.h
Manages all of a Display Coordinator's client connections.
Instances are not thread-safe.
Public Methods
void ClientSet (inspect::Node root_node)
Creates an empty set.
`root_node` will be populated with one sub-node per connected client.
Defined at line 29 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void ~ClientSet ()
Defined at line 31 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void DispatchOnDisplaysChanged (std::span<const display::DisplayId> added_display_ids, std::span<const display::DisplayId> removed_display_ids)
Dispatches the changes to all clients.
Defined at line 33 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void ClientSet (const ClientSet & )
Defined at line 37 of file ../../src/graphics/display/drivers/coordinator/client-set.h
void ClientSet (ClientSet && )
Defined at line 38 of file ../../src/graphics/display/drivers/coordinator/client-set.h
ClientSet & operator= (const ClientSet & )
Defined at line 39 of file ../../src/graphics/display/drivers/coordinator/client-set.h
ClientSet & operator= (ClientSet && )
Defined at line 40 of file ../../src/graphics/display/drivers/coordinator/client-set.h
void DispatchOnDisplayVsync (display::DisplayId display_id, zx::time_monotonic timestamp, display::DriverConfigStamp vsync_config_stamp, ClientPriority client_priority)
Dispatches the VSync to the client that submitted the configuration.
Defined at line 45 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void DispatchOnCaptureComplete ()
Dispatches the event to all clients.
Defined at line 62 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void SetVirtconMode (fuchsia_hardware_display::wire::VirtconMode virtcon_mode)
May change the client that owns the displays.
Defined at line 73 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
zx::result<ClientId> ConnectClient (Controller * controller, ClientPriority client_priority, fidl::ServerEnd<fuchsia_hardware_display::Coordinator> coordinator_server_end, fidl::ClientEnd<fuchsia_hardware_display::CoordinatorListener> coordinator_listener_client_end)
`controller` must be null and must outlive the ClientSet.
Defined at line 95 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void SendInitialState (ClientId client_id, std::span<const display::DisplayId> current_display_ids)
Transmits the initial set of connected displays to a client.
After this method completes, the client will receive an OnDisplaysChanged
event that describes all the currently connected displays.
This method is a no-op if there is no client with the given `client_id`.
This simplifies handling clients who disconnect before receiving the
initial set of displays.
Defined at line 149 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void OnClientDisconnected (ClientProxy * client)
`client` must point to a proxy associated with a client in this set.
This method must be called at most once for a client.
Defined at line 192 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
std::optional<ClientPriority> FindConfigStampSource (display::DriverConfigStamp driver_config_stamp)
Returns the priority of the client that applied the display configuration.
Returns nullopt if the applied configuration does not belong to any of the
current clients. This happens if the client that applied the configuration
has disconnected.
Defined at line 173 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
void CloseAll ()
Closes all the client connections.
The ClientSet will be cleared asynchronously. Each client's FIDL
disconnection handler will remove the client from the set.
Defined at line 239 of file ../../src/graphics/display/drivers/coordinator/client-set.cc
ClientProxy * GetClientOwningDisplays ()
Returns null if no client owns the displays.
Defined at line 255 of file ../../src/graphics/display/drivers/coordinator/client-set.cc