pub struct CoordinatorSynchronousProxy { /* private fields */ }

Implementations§

source§

impl CoordinatorSynchronousProxy

source

pub fn new(channel: Channel) -> Self

source

pub fn into_channel(self) -> Channel

source

pub fn wait_for_event(&self, deadline: Time) -> Result<CoordinatorEvent, Error>

Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.

source

pub fn import_image( &self, image_metadata: &ImageMetadata, buffer_id: &BufferId, image_id: &ImageId, ___deadline: Time ) -> Result<CoordinatorImportImageResult, Error>

Imports a Buffer-Collection backed image.

image_metadata must be compatible with the arguments passed to [fuchsia.hardware.display/Coordinator.SetBufferCollectionConstraints] on the buffer_collection_id.

Returns ZX_ERR_NOT_SUPPORTED if the display hardware doesn’t support image_config. Returns ZX_ERR_ALREADY_EXISTS if image_id was used in a successful ImportImage() without a corresponding ReleaseImage().

source

pub fn release_image(&self, image_id: &ImageId) -> Result<(), Error>

Releases an imported image.

image_id must be already imported by [fuchsia.hardware.display/Coordinator.ImportImage].

The image must not be the capture target of an ongoing capture specified in [fuchsia.hardware.display/Coordinator.StartCapture].

When an image is released, it is immediately removed from any pending or active configurations, and any fences associated with the image are dropped. The resources associated with the image will be released as soon as the image is no longer in use.

source

pub fn import_event(&self, event: Event, id: &EventId) -> Result<(), Error>

Imports an event into the driver and associates it with the given id.

It is illegal for id to be equal to INVALID_DISP_ID, and it is undefined to import one event with two different ids or to import two different events with the same id (note that ids map well to koids).

If a client is reusing events, they must clear the signal before referencing the id again.

source

pub fn release_event(&self, id: &EventId) -> Result<(), Error>

Releases the event imported with the given id.

If any images are currently using the given event, the event will still be waited up or signaled as appropriate before its resources are released. It is an error to reuse an ID while the active config has references to it.

source

pub fn create_layer( &self, ___deadline: Time ) -> Result<CoordinatorCreateLayerResult, Error>

source

pub fn destroy_layer(&self, layer_id: &LayerId) -> Result<(), Error>

source

pub fn set_display_mode( &self, display_id: &DisplayId, mode: &Mode ) -> Result<(), Error>

source

pub fn set_display_color_conversion( &self, display_id: &DisplayId, preoffsets: &[f32; 3], coefficients: &[f32; 9], postoffsets: &[f32; 3] ) -> Result<(), Error>

source

pub fn set_display_layers( &self, display_id: &DisplayId, layer_ids: &[LayerId] ) -> Result<(), Error>

source

pub fn set_layer_primary_config( &self, layer_id: &LayerId, image_metadata: &ImageMetadata ) -> Result<(), Error>

source

pub fn set_layer_primary_position( &self, layer_id: &LayerId, transform: Transform, src_frame: &Frame, dest_frame: &Frame ) -> Result<(), Error>

source

pub fn set_layer_primary_alpha( &self, layer_id: &LayerId, mode: AlphaMode, val: f32 ) -> Result<(), Error>

source

pub fn set_layer_color_config( &self, layer_id: &LayerId, pixel_format: PixelFormat, color_bytes: &[u8] ) -> Result<(), Error>

source

pub fn set_layer_image( &self, layer_id: &LayerId, image_id: &ImageId, wait_event_id: &EventId, signal_event_id: &EventId ) -> Result<(), Error>

source

pub fn check_config( &self, discard: bool, ___deadline: Time ) -> Result<(ConfigResult, Vec<ClientCompositionOp>), Error>

source

pub fn apply_config(&self) -> Result<(), Error>

source

pub fn get_latest_applied_config_stamp( &self, ___deadline: Time ) -> Result<ConfigStamp, Error>

Gets the stamp provided with the latest configuration the client submitted (by calling ApplyConfig()) and the display core driver accepted; the display configuration may not have been rendered yet because of pending image availability or pending layer changes. If no configuration was applied before, returns INVALID_CONFIG_STAMP_VALUE.

source

pub fn apply_config2(&self, signal_fences: Vec<Event>) -> Result<(), Error>

Applies any pending changes to the current configuration. This will not apply pending changes to layers which are not on any display.

For each event in signal_fences, once the pending configuration is applied to and contents are displayed on all the displays connected to the Coordinator, it will be signaled immediately.

Arguments

signal_fences: Stores all fence events that will be signaled once the configuration is applied.

Error handling

If the input is invalid, for example:
    - `signal_fences` contains invalid events
or the pending configuration cannot be applied, this call will
silently fail, so the client should ensure its configuration is
valid with CheckConfig().
source

pub fn enable_vsync(&self, enable: bool) -> Result<(), Error>

source

pub fn acknowledge_vsync(&self, cookie: u64) -> Result<(), Error>

source

pub fn set_virtcon_mode(&self, mode: VirtconMode) -> Result<(), Error>

Sets the visibility behavior of the virtcon.

This must only be called from the Virtcon client.

source

pub fn import_buffer_collection( &self, buffer_collection_id: &BufferCollectionId, buffer_collection_token: ClientEnd<BufferCollectionTokenMarker>, ___deadline: Time ) -> Result<CoordinatorImportBufferCollectionResult, Error>

source

pub fn release_buffer_collection( &self, buffer_collection_id: &BufferCollectionId ) -> Result<(), Error>

source

pub fn set_buffer_collection_constraints( &self, buffer_collection_id: &BufferCollectionId, buffer_usage: &ImageBufferUsage, ___deadline: Time ) -> Result<CoordinatorSetBufferCollectionConstraintsResult, Error>

source

pub fn is_capture_supported( &self, ___deadline: Time ) -> Result<CoordinatorIsCaptureSupportedResult, Error>

Returns true if Capture is supported on the platform.

source

pub fn start_capture( &self, signal_event_id: &EventId, image_id: &ImageId, ___deadline: Time ) -> Result<CoordinatorStartCaptureResult, Error>

Starts capture. Client must provide a valid signal_event_id and image_id. signal_event_id must have been imported into the driver using ImportEvent FIDL API. Image_id is the id from ImportImageForCapture. The client will get notified once capture is complete via signal_event_id. Returns ZX_ERR_NOT_SUPPORTED if coordinator does not support capture

source

pub fn set_minimum_rgb( &self, minimum_rgb: u8, ___deadline: Time ) -> Result<CoordinatorSetMinimumRgbResult, Error>

Set the minimum value of rgb channels. Valid range [0 255] inclusive. Returns ZX_ERR_NOT_SUPPORTED when the display hardware does not support this feature. This API is meant to address backlight bleeding that may occur on some hardware that have a specific type of panel and hardware assembly. The evolution of this API is highly hardware and product dependant and therefore as products evolve, this API may change or support for this API may become non-existent. Therefore, this API should be used with caution.

Unlike other calls in this API, SetMiniumRgb is applied immediately, and does not wait for ApplyConfig(). It is, however, still stateful.

source

pub fn set_display_power( &self, display_id: &DisplayId, power_on: bool, ___deadline: Time ) -> Result<CoordinatorSetDisplayPowerResult, Error>

Power off/on the display panel.

This function takes effect immediately. Clients don’t need to call ApplyConfig() to commit this command.

Once a display is turned off, it will not deliver vsync events, which may include the vsync event for the most recently applied config.

Staged display control commands (e.g. SetDisplayLayer) will not be affected. They are still applied to the display device when client calls ApplyConfig(), but the contents will be shown on display panel only after client powers on the display again.

Newly added displays are turned on by default.

Returns ZX_ERR_NOT_FOUND if display_id is invalid when Coordinator handles this method. Returns ZX_ERR_NOT_SUPPORTED if the display driver IC doesn’t support turning on/off displays.

Trait Implementations§

source§

impl Debug for CoordinatorSynchronousProxy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl SynchronousProxy for CoordinatorSynchronousProxy

§

type Proxy = CoordinatorProxy

The async proxy for the same protocol.
§

type Protocol = CoordinatorMarker

The protocol which this Proxy controls.
source§

fn from_channel(inner: Channel) -> Self

Create a proxy over the given channel.
source§

fn into_channel(self) -> Channel

Convert the proxy back into a channel.
source§

fn as_channel(&self) -> &Channel

Get a reference to the proxy’s underlying channel. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more