pub struct ScreenshotSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ScreenshotSynchronousProxy
impl ScreenshotSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ScreenshotEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ScreenshotEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn take(
&self,
payload: ScreenshotTakeRequest,
___deadline: MonotonicInstant,
) -> Result<ScreenshotTakeResponse, Error>
pub fn take( &self, payload: ScreenshotTakeRequest, ___deadline: MonotonicInstant, ) -> Result<ScreenshotTakeResponse, Error>
Collects the current graphical content of a display in a specified buffer format
in the
sRGB color space. Note that the sRGB color space is non-linear, meaning that unit tests
doing pixel equality checks making use of non-fully saturated colors should convert to a
linear color space.
See https://fuchsia.dev/fuchsia-src/concepts/ui/scenic/color_spaces for more information.
Screenshot is taken immediately, populated with the display’s content from the most recent VSYNC.
If the client calls [Take
] a second time before a first [Take
] call returns, the server
will close the Screenshot connection with a ZX_ERR_SHOULD_WAIT epitaph.
If capture fails due to an internal error, the server will close the Screenshot connection with a ZX_ERR_INTERNAL epitaph.
Sourcepub fn take_file(
&self,
payload: ScreenshotTakeFileRequest,
___deadline: MonotonicInstant,
) -> Result<ScreenshotTakeFileResponse, Error>
pub fn take_file( &self, payload: ScreenshotTakeFileRequest, ___deadline: MonotonicInstant, ) -> Result<ScreenshotTakeFileResponse, Error>
Collects the current graphical content of a display in a specified buffer format
in the
sRGB color space. Note that the sRGB color space is non-linear, meaning that unit tests
doing pixel equality checks making use of non-fully saturated colors should convert to a
linear color space.
TODO(https://fxbug.dev/42065844): Link to fuchsia.dev documentation when it’s up.
Screenshot is taken immediately, populated with the display’s content from the most recent VSYNC.
If the client calls [TakeFile
] a second time before a first [TakeFile
] call returns,
the server will close the Screenshot connection with a ZX_ERR_SHOULD_WAIT epitaph.
If capture fails due to an internal error, the server will close the Screenshot connection with a ZX_ERR_INTERNAL epitaph.
This call should be used if the client is on the host and does not support VMOs, as is the case for ffx tools.
Trait Implementations§
Source§impl Debug for ScreenshotSynchronousProxy
impl Debug for ScreenshotSynchronousProxy
Source§impl SynchronousProxy for ScreenshotSynchronousProxy
impl SynchronousProxy for ScreenshotSynchronousProxy
Source§type Proxy = ScreenshotProxy
type Proxy = ScreenshotProxy
Source§type Protocol = ScreenshotMarker
type Protocol = ScreenshotMarker
Proxy
controls.