pub trait EngineServerHandler<___T: Transport = DriverChannel> {
Show 15 methods
// Required methods
fn complete_coordinator_connection(
&mut self,
request: Request<CompleteCoordinatorConnection, ___T>,
responder: Responder<CompleteCoordinatorConnection, ___T>,
) -> impl Future<Output = ()> + Send;
fn unset_listener(&mut self) -> impl Future<Output = ()> + Send;
fn import_buffer_collection(
&mut self,
request: Request<ImportBufferCollection, ___T>,
responder: Responder<ImportBufferCollection, ___T>,
) -> impl Future<Output = ()> + Send;
fn release_buffer_collection(
&mut self,
request: Request<ReleaseBufferCollection, ___T>,
responder: Responder<ReleaseBufferCollection, ___T>,
) -> impl Future<Output = ()> + Send;
fn import_image(
&mut self,
request: Request<ImportImage, ___T>,
responder: Responder<ImportImage, ___T>,
) -> impl Future<Output = ()> + Send;
fn import_image_for_capture(
&mut self,
request: Request<ImportImageForCapture, ___T>,
responder: Responder<ImportImageForCapture, ___T>,
) -> impl Future<Output = ()> + Send;
fn release_image(
&mut self,
request: Request<ReleaseImage, ___T>,
) -> impl Future<Output = ()> + Send;
fn check_configuration(
&mut self,
request: Request<CheckConfiguration, ___T>,
responder: Responder<CheckConfiguration, ___T>,
) -> impl Future<Output = ()> + Send;
fn submit_configuration(
&mut self,
request: Request<SubmitConfiguration, ___T>,
responder: Responder<SubmitConfiguration, ___T>,
) -> impl Future<Output = ()> + Send;
fn set_buffer_collection_constraints(
&mut self,
request: Request<SetBufferCollectionConstraints, ___T>,
responder: Responder<SetBufferCollectionConstraints, ___T>,
) -> impl Future<Output = ()> + Send;
fn set_display_power_mode(
&mut self,
request: Request<SetDisplayPowerMode, ___T>,
responder: Responder<SetDisplayPowerMode, ___T>,
) -> impl Future<Output = ()> + Send;
fn set_minimum_rgb(
&mut self,
request: Request<SetMinimumRgb, ___T>,
responder: Responder<SetMinimumRgb, ___T>,
) -> impl Future<Output = ()> + Send;
fn start_capture(
&mut self,
request: Request<StartCapture, ___T>,
responder: Responder<StartCapture, ___T>,
) -> impl Future<Output = ()> + Send;
fn release_capture(
&mut self,
request: Request<ReleaseCapture, ___T>,
responder: Responder<ReleaseCapture, ___T>,
) -> impl Future<Output = ()> + Send;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> + Send { ... }
}Expand description
A server handler for the Engine protocol.
See Engine for more details.
Required Methods§
Sourcefn complete_coordinator_connection(
&mut self,
request: Request<CompleteCoordinatorConnection, ___T>,
responder: Responder<CompleteCoordinatorConnection, ___T>,
) -> impl Future<Output = ()> + Send
fn complete_coordinator_connection( &mut self, request: Request<CompleteCoordinatorConnection, ___T>, responder: Responder<CompleteCoordinatorConnection, ___T>, ) -> impl Future<Output = ()> + Send
Starts the information flow from the engine driver to the Coordinator.
Must be called exactly once, before all the other calls below.
Sourcefn unset_listener(&mut self) -> impl Future<Output = ()> + Send
fn unset_listener(&mut self) -> impl Future<Output = ()> + Send
Clears the DisplayEngineListener connection established by
[Engine.CompleteCoordinatorConnection].
Sourcefn import_buffer_collection(
&mut self,
request: Request<ImportBufferCollection, ___T>,
responder: Responder<ImportBufferCollection, ___T>,
) -> impl Future<Output = ()> + Send
fn import_buffer_collection( &mut self, request: Request<ImportBufferCollection, ___T>, responder: Responder<ImportBufferCollection, ___T>, ) -> impl Future<Output = ()> + Send
Sets up this driver to use a Sysmem BufferCollection.
Fails with ZX_ERR_INTERNAL if any error occurs during the setup process, which mainly consists of communicating with the Sysmem service.
Sourcefn release_buffer_collection(
&mut self,
request: Request<ReleaseBufferCollection, ___T>,
responder: Responder<ReleaseBufferCollection, ___T>,
) -> impl Future<Output = ()> + Send
fn release_buffer_collection( &mut self, request: Request<ReleaseBufferCollection, ___T>, responder: Responder<ReleaseBufferCollection, ___T>, ) -> impl Future<Output = ()> + Send
Releases the resources needed to use a Sysmem BufferCollection.
TODO(https://fxbug.dev/394954078): Make this method infallible.
Sourcefn import_image(
&mut self,
request: Request<ImportImage, ___T>,
responder: Responder<ImportImage, ___T>,
) -> impl Future<Output = ()> + Send
fn import_image( &mut self, request: Request<ImportImage, ___T>, responder: Responder<ImportImage, ___T>, ) -> impl Future<Output = ()> + Send
Sets up the hardware to use a buffer as a display image data source.
Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the BufferCollection’s buffers are not yet allocated. Fails with ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer from the Sysmem service.
The implementation must ignore any Sysmem information around weak VMO
handles. Display stack consumers are responsible for ensuring that weak
VMOs are closed in a timely manner, which may involve calling
[Engine.ReleaseImage] and [Engine.SubmitConfiguration].
Sourcefn import_image_for_capture(
&mut self,
request: Request<ImportImageForCapture, ___T>,
responder: Responder<ImportImageForCapture, ___T>,
) -> impl Future<Output = ()> + Send
fn import_image_for_capture( &mut self, request: Request<ImportImageForCapture, ___T>, responder: Responder<ImportImageForCapture, ___T>, ) -> impl Future<Output = ()> + Send
Sets up the hardware to use a buffer for display capture output.
This call must only be issued when the engine driver supports capture.
Capture support is reported in [EngineInfo.is_capture_supported]
returned by [Engine.CompleteCoordinatorConnection].
Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the BufferCollection’s buffers are not yet allocated. Fails with ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer from the Sysmem service.
The implementation must ignore any Sysmem information around weak VMO
handles. Display stack consumers are responsible for ensuring that weak
VMOs are closed in a timely manner, which may involve calling
[Engine.ReleaseImage] and [Engine.SubmitConfiguration].
Sourcefn release_image(
&mut self,
request: Request<ReleaseImage, ___T>,
) -> impl Future<Output = ()> + Send
fn release_image( &mut self, request: Request<ReleaseImage, ___T>, ) -> impl Future<Output = ()> + Send
Releases resources for using a buffer as a display image data source.
Sourcefn check_configuration(
&mut self,
request: Request<CheckConfiguration, ___T>,
responder: Responder<CheckConfiguration, ___T>,
) -> impl Future<Output = ()> + Send
fn check_configuration( &mut self, request: Request<CheckConfiguration, ___T>, responder: Responder<CheckConfiguration, ___T>, ) -> impl Future<Output = ()> + Send
Verifies that a configuration can be presented on a display.
The verification result must be valid for any configuration derived from the given configuration.
A derived configuration can be obtained from another configuration by applying one or more of the following operations. The list of operations is expected to slowly grow over time.
- Replace an image ID with another image ID. The two IDs must identify images that were imported with the same metadata.
Sourcefn submit_configuration(
&mut self,
request: Request<SubmitConfiguration, ___T>,
responder: Responder<SubmitConfiguration, ___T>,
) -> impl Future<Output = ()> + Send
fn submit_configuration( &mut self, request: Request<SubmitConfiguration, ___T>, responder: Responder<SubmitConfiguration, ___T>, ) -> impl Future<Output = ()> + Send
Submits a configuration for future presentation on a display.
Sourcefn set_buffer_collection_constraints(
&mut self,
request: Request<SetBufferCollectionConstraints, ___T>,
responder: Responder<SetBufferCollectionConstraints, ___T>,
) -> impl Future<Output = ()> + Send
fn set_buffer_collection_constraints( &mut self, request: Request<SetBufferCollectionConstraints, ___T>, responder: Responder<SetBufferCollectionConstraints, ___T>, ) -> impl Future<Output = ()> + Send
Conveys the display hardware’s limitations on image buffers to sysmem.
Fails with ZX_ERR_INTERNAL if any error occurs while communicating with the the Sysmem service.
Sourcefn set_display_power_mode(
&mut self,
request: Request<SetDisplayPowerMode, ___T>,
responder: Responder<SetDisplayPowerMode, ___T>,
) -> impl Future<Output = ()> + Send
fn set_display_power_mode( &mut self, request: Request<SetDisplayPowerMode, ___T>, responder: Responder<SetDisplayPowerMode, ___T>, ) -> impl Future<Output = ()> + Send
Sets a display’s power mode.
Returns ZX_ERR_NOT_SUPPORTED if the display driver or hardware does
not support the requested power mode.
Sourcefn set_minimum_rgb(
&mut self,
request: Request<SetMinimumRgb, ___T>,
responder: Responder<SetMinimumRgb, ___T>,
) -> impl Future<Output = ()> + Send
fn set_minimum_rgb( &mut self, request: Request<SetMinimumRgb, ___T>, responder: Responder<SetMinimumRgb, ___T>, ) -> impl Future<Output = ()> + Send
Set the minimum value of RGB channels.
Fails with ZX_ERR_NOT_SUPPORTED if RGB clamping is not supported. Most engine drivers are expected to fail in this manner.
Sourcefn start_capture(
&mut self,
request: Request<StartCapture, ___T>,
responder: Responder<StartCapture, ___T>,
) -> impl Future<Output = ()> + Send
fn start_capture( &mut self, request: Request<StartCapture, ___T>, responder: Responder<StartCapture, ___T>, ) -> impl Future<Output = ()> + Send
Starts a display capture operation.
The engine driver must not be performing another capture operation. The
capture operation is considered to be in-progress from the moment when a
successful call to [DisplayEngine.StartCapture] is issued, until the
moment when the engine driver issues a call to
[DisplayEngineListener.OnCaptureComplete].
This call must only be issued when the engine driver supports capture.
Capture support is reported in [EngineInfo.is_capture_supported]
returned by [Engine.CompleteCoordinatorConnection].
This call must only be issued after a configuration has been submitted to the display.
Fails with ZX_ERR_IO_REFUSED if the display engine hardware failed to start the capture. This error could point to a systemic issue, such as the system having insufficient DRAM bandwidth to capture the most recent submitted display configuration. This error could also be caused by a temporary hardware failure.
Sourcefn release_capture(
&mut self,
request: Request<ReleaseCapture, ___T>,
responder: Responder<ReleaseCapture, ___T>,
) -> impl Future<Output = ()> + Send
fn release_capture( &mut self, request: Request<ReleaseCapture, ___T>, responder: Responder<ReleaseCapture, ___T>, ) -> impl Future<Output = ()> + Send
Releases resources for using a buffer for display capture output.
This call must only be issued when the engine driver supports capture.
Capture support is reported in [EngineInfo.is_capture_supported]
returned by [Engine.CompleteCoordinatorConnection].
TODO(https://fxbug.dev/394954078): Make this method infallible.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.