template <>
class WireSyncClientImpl
Defined at line 4051 of file fidling/gen/sdk/fidl/fuchsia.hardware.display/fuchsia.hardware.display/cpp/fidl/fuchsia.hardware.display/cpp/wire_messaging.h
Methods to make a sync FIDL call directly on an unowned handle or a
const reference to a |::fidl::ClientEnd
<
::fuchsia_hardware_display::Coordinator>|,
avoiding setting up a client.
Public Methods
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::ImportImage> ImportImage (const ::fuchsia_hardware_display_types::wire::ImageMetadata & image_metadata, const ::fuchsia_hardware_display::wire::BufferCollectionId & buffer_collection_id, uint32_t buffer_index, const ::fuchsia_hardware_display::wire::ImageId & image_id)
Imports a Buffer-Collection backed image.
Returns `ZX_ERR_NOT_SUPPORTED` if the display hardware doesn't support
`image_metadata`.
Returns `ZX_ERR_ALREADY_EXISTS` if `image_id` was used in a successful
`ImportImage()` without a corresponding `ReleaseImage()`.
Returns `ZX_ERR_NO_MEMORY` if memory cannot be allocated for managing the image
Additionally, this method delegates internally to `fuchsia.hardware.display.engine/Engine`,
and will forward errors received from `ImportImage()` and `ImportImageForCapture()`.
Allocates 88 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus ReleaseImage (const ::fuchsia_hardware_display::wire::ImageId & image_id)
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 draft
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.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus ImportEvent (::zx::event && event, const ::fuchsia_hardware_display::wire::EventId & id)
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.
Allocates 48 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus ReleaseEvent (const ::fuchsia_hardware_display::wire::EventId & id)
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.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::CreateLayer> CreateLayer ()
Creates a new layer.
Layers are not associated with a particular display, but they can only be
shown on at most one display at any given time. A layer is considered in
use from the time it is passed to SetDisplayLayers until a subsequent
configuration is applied which does not include the layer or until its
display is removed.
Allocates 56 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus DestroyLayer (const ::fuchsia_hardware_display::wire::LayerId & layer_id)
Destroys the given layer.
It is illegal to destroy a layer which does not exist or which is in use.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetDisplayMode (const ::fuchsia_hardware_display_types::wire::DisplayId & display_id, const ::fuchsia_hardware_display_types::wire::Mode & mode)
Sets the mode for a display.
Allocates 56 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetDisplayColorConversion (const ::fuchsia_hardware_display_types::wire::DisplayId & display_id, const ::fidl::Array<float, 3> & preoffsets, const ::fidl::Array<float, 9> & coefficients, const ::fidl::Array<float, 3> & postoffsets)
Set the color conversion applied to the display. The conversion is applied to
to each pixel according to the formula:
(coefficients * (pixel + preoffsets)) + postoffsets
where pixel is a column vector consisting of the pixel's 3 components.
`coefficients` is passed in row-major order. If the first entry of an array is NaN, the
array is treated as the identity element for the relevant operation.
Hardware that support color correction generally accept a limited range of coefficient
values. Coefficients in the range of [-2, 2] inclusive will be accepted by most
hardware. The hardware driver will clamp values that are outside its acceptable range.
`preoffsets`, `postoffsets`: Clients are encourged to produce color correction values that
do not depend on pre and post offsets since some hardware do not have support for that.
For cases where pre and post offset values need to be used, the range should be limited to
(-1, 1) exclusive as confirmed by CheckConfig API. Values outside this range will be
rejected.
Clients are encouraged to use the CheckConfig API to confirm support for correction and to
validate their color correction input values.
This a stateful call. Once color conversion values have been succesfully applied via a call
to ApplyConfig() they will remain in place until changed and another ApplyConfig() call is
successful. If SetDisplayColorConversion() is called and then the config is discarded, then
the last successfully applied state is restored.
Allocates 104 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetDisplayLayers (const ::fuchsia_hardware_display_types::wire::DisplayId & display_id, ::fidl::VectorView< ::fuchsia_hardware_display::wire::LayerId> layer_ids)
Assigns a list of layers to be composited on a display.
Allocates 16 bytes of response buffer on the stack. Request is heap-allocated.
::fidl::OneWayStatus SetLayerPrimaryConfig (const ::fuchsia_hardware_display::wire::LayerId & layer_id, const ::fuchsia_hardware_display_types::wire::ImageMetadata & image_metadata)
Configures the layer as a primary layer with no image and the default
config (no src_frame cropping, the identity transform, positioned in the
top-left corner of the composed output, and no scaling).
See the documentation on SetLayerImage for details on how this method
affects the layer's contents.
It is illegal to pass an invalid layer id.
Allocates 56 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetLayerPrimaryPosition (const ::fuchsia_hardware_display::wire::LayerId & layer_id, ::fuchsia_hardware_display_types::wire::CoordinateTransformation image_source_transformation, const ::fuchsia_math::wire::RectU & image_source, const ::fuchsia_math::wire::RectU & display_destination)
Sets the layer transform, scaling, and positioning.
CheckConfig() will return INVALID_CONFIG if any of the configuration
validity conditions specified here is violated.
Calling this on a non-primary layer or passing an invalid transform is
illegal.
Allocates 80 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetLayerPrimaryAlpha (const ::fuchsia_hardware_display::wire::LayerId & layer_id, ::fuchsia_hardware_display_types::wire::AlphaMode mode, float val)
Sets the alpha mode of the plane.
If `mode` == DISABLED, the layer is opaque and `val` is ignored.
If `mode` == PREMULTIPLIED or HW_MULTIPLY and `val` is NaN, the alpha
used when blending is determined by the per-pixel alpha channel.
If `mode` == PREMULTIPLIED or HW_MULTIPLY and `val` is not NaN, the
alpha used when blending is the product of `val` and any per-pixel
alpha. Additionally, if `mode` == PREMULTIPLIED, then the hardware
premultiplies the color channel with `val` before blending.
It is illegal to call this on a non-primary layer, to pass an
invalid mode, or to pass a value of `val` which is not NaN or
in the range [0, 1].
Allocates 48 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetLayerColorConfig (const ::fuchsia_hardware_display::wire::LayerId & layer_id, const ::fuchsia_hardware_display_types::wire::Color & color, const ::fuchsia_math::wire::RectU & display_destination)
Configures the layer as a solid color fill layer.
It is illegal to call this on an invalid layer.
Allocates 72 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetLayerImage2 (const ::fuchsia_hardware_display::wire::LayerId & layer_id, const ::fuchsia_hardware_display::wire::ImageId & image_id, const ::fuchsia_hardware_display::wire::EventId & wait_event_id)
Sets the image for the layer's draft configuration.
If wait_event_id corresponds to an imported event, the driver will
wait for ZX_EVENT_SIGNALED on the object before presenting the image.
A layer's applied image is the most recently applied image which either has
no wait event or whose wait event has been signaled. Whenever a new image
is applied, any older images which never got applied are dropped, and
their signal events will be fired as soon as their wait events are
signaled. The driver also does not have any concept like 'target vsync',
meaning that if multiple images are applied within one vsync period, then
only the last image will actually be displayed.
By default, the driver retains an applied image until a new image is
applied. However, setting a layer's ImageConfig with SetLayerPrimaryConfig
resets the layer's applied and waiting images, even if the new ImageConfig
matches the old ImageConfig.
An image cannot be used for multiple layers simultaneously, nor can an
image be given back to the display coordinator while it is still in use.
An image is considered in use when it is part of a draft configuration
or from when its configuration is applied until it is replaced by a
subsequent configuration that is *displayed* (not merely applied).
It is illegal to call this with an invalid layer or image id, to
call it on a color layer, or to call it with an image and layer whose
ImageConfigs do not match. It is illegal to apply a configuration
with an image layer that has no image (note that is is not illegal to
validate such a configuration). It is illegal to reuse a wait event which
another layer that has not been presented is waiting on.
Each layer can track a maximum of `MAX_WAITING_IMAGES_PER_LAYER` waiting images.
An image becomes "waiting" when it is the most recent image set to a layer that appears in
a config that is applied via `ApplyConfig()` or similar. To avoid exceeding the maximum,
the client can infer that the image is no longer waiting by:
- noting the config stamp when the config containing the layer/image is applied
- watching for that same (or later) config stamp to be returned by
`CoordinatorListener.OnVsync()`.
Allocates 56 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::CheckConfig> CheckConfig ()
Validates the draft configuration.
Validation entails checking that the draft configuration can be used
by the system's display hardware.
Most SetX operations require verifying the draft configuration. The
following operations do not require revalidation.
* SetLayerImage2()
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus DiscardConfig ()
Discard all draft configuration changes.
Allocates 32 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::GetLatestAppliedConfigStamp> GetLatestAppliedConfigStamp ()
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 draft layer changes.
If no configuration was applied before, returns `INVALID_CONFIG_STAMP_VALUE`.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus ApplyConfig3 (::fuchsia_hardware_display::wire::CoordinatorApplyConfig3Request CoordinatorApplyConfig3Request)
Applies any draft changes to the current configuration. This will
not apply draft changes to layers which are not on any display.
If the draft configuration cannot be applied, this call will silently
fail, so the client should ensure its configuration is valid by
calling [`Coordinator.CheckConfig`].
Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus AcknowledgeVsync (uint64_t cookie)
Acknowledges the receipt of one `OnVsync` message.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus SetVirtconMode (::fuchsia_hardware_display::wire::VirtconMode mode)
Sets the visibility behavior of the virtcon.
This must only be called from the Virtcon client.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::ImportBufferCollection> ImportBufferCollection (const ::fuchsia_hardware_display::wire::BufferCollectionId & buffer_collection_id, ::fidl::ClientEnd< ::fuchsia_sysmem2::BufferCollectionToken> && buffer_collection_token)
Import a sysmem buffer collection token. `buffer_collection_id` must not
already be in use.
Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::OneWayStatus ReleaseBufferCollection (const ::fuchsia_hardware_display::wire::BufferCollectionId & buffer_collection_id)
Release an imported buffer collection.
Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::SetBufferCollectionConstraints> SetBufferCollectionConstraints (const ::fuchsia_hardware_display::wire::BufferCollectionId & buffer_collection_id, const ::fuchsia_hardware_display_types::wire::ImageBufferUsage & buffer_usage)
Takes an imported buffer collection and sets the constraints
on it so that it can be imported with a specific config.
Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::IsCaptureSupported> IsCaptureSupported ()
Returns true if Capture is supported on the platform.
Allocates 48 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::StartCapture> StartCapture (const ::fuchsia_hardware_display::wire::EventId & signal_event_id, const ::fuchsia_hardware_display::wire::ImageId & image_id)
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
Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::SetMinimumRgb> SetMinimumRgb (uint8_t minimum_rgb)
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.
Allocates 56 bytes of message buffer on the stack. No heap allocation necessary.
::fidl::WireResult< ::fuchsia_hardware_display::Coordinator::SetDisplayPowerMode> SetDisplayPowerMode (const ::fuchsia_hardware_display_types::wire::DisplayId & display_id, ::fuchsia_hardware_display_types::wire::PowerMode power_mode)
Sets the display panel power mode.
This call takes effect immediately. Clients don't need to call
[`Coordinator.ApplyConfig`].
Fails with ZX_ERR_NOT_FOUND if `display_id` does not belong to a display
known by the Coordinator. This can happen if a client issues a call to
[`Coordinator.SetDisplayPowerMode`] before it receives a notification
that the display was removed.
This method is not idempotent. Each [`Coordinator.SetDisplayPowerMode`]
call explicitly sets the power mode on the display hardware, though the
display hardware driver may choose to behave idempotently.
Fails with ZX_ERR_NOT_SUPPORTED if the display drivers or the hardware
don't support the given `power_mode`.
Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.