Skip to main content

CompositionInterop

Struct CompositionInterop 

Source
pub struct CompositionInterop { /* private fields */ }
Expand description

The interop of a compositor with the GPU objects of its render interface context.

Implementations§

Source§

impl CompositionInterop

Source

pub fn new( compositor: &Rc<Compositor>, external_objects: Rc<dyn IExternalObjectsRenderInterfaceContextFeature>, ) -> Rc<CompositionInterop>

Creates the interop over a feature of the render interface.

The feature is an object of the server side and is kept inside the compositor lock from here on: a caller that is not inside the lock hands it over whole, without keeping a clone. (Upstream the constructor runs in a job of the render thread.)

§Panics

When the compositor is confined to its render thread and that thread has no context of the render interface: see try_new.

Trait Implementations§

Source§

impl ICompositionGpuInterop for CompositionInterop

Source§

fn import_shared_semaphore( &self, _image: Rc<dyn ICompositionImportableSharedGpuContextSemaphore>, ) -> Rc<dyn ICompositionImportedGpuImage>

Not supported (NotSupportedException upstream).

Source§

fn supported_image_handle_types(&self) -> Vec<String>

Returns the list of image handle types supported by the current GPU backend, see KnownPlatformGraphicsExternalImageHandleTypes
Source§

fn supported_semaphore_types(&self) -> Vec<String>

Returns the list of semaphore types supported by the current GPU backend, see KnownPlatformGraphicsExternalSemaphoreHandleTypes
Source§

fn supported_dma_buf_formats(&self) -> Option<Vec<PlatformGraphicsDrmFormat>>

Returns the DRM format/modifier pairs the current GPU backend can import as KnownPlatformGraphicsExternalImageHandleTypes::DMA_BUF_FILE_DESCRIPTOR images, or None when the backend cannot enumerate them.
Source§

fn get_synchronization_capabilities( &self, image_handle_type: &str, ) -> CompositionGpuImportedImageSynchronizationCapabilities

Returns the supported ways to synchronize access to the imported GPU image
Source§

fn import_image( &self, handle: Rc<dyn IPlatformHandle>, properties: PlatformGraphicsExternalImageProperties, ) -> Rc<dyn ICompositionImportedGpuImage>

Asynchronously imports a texture. The returned object is immediately usable.
Source§

fn import_shared_image( &self, image: Arc<dyn ICompositionImportableSharedGpuContextImage>, ) -> Rc<dyn ICompositionImportedGpuImage>

Asynchronously imports a texture. The returned object is immediately usable. If import operation fails, the caller is responsible for destroying the handle Read more
Source§

fn import_semaphore( &self, handle: Rc<dyn IPlatformHandle>, ) -> Rc<dyn ICompositionImportedGpuSemaphore>

Asynchronously imports a semaphore object. The returned object is immediately usable. If import operation fails, the caller is responsible for destroying the handle
Source§

fn is_lost(&self) -> bool

Indicates if the device context this instance is associated with is no longer available
Source§

fn device_luid(&self) -> Option<Vec<u8>>

The LUID of the graphics adapter used by the compositor
Source§

fn set_device_luid(&self, value: Option<Vec<u8>>)

Source§

fn device_uuid(&self) -> Option<Vec<u8>>

The UUID of the graphics adapter used by the compositor
Source§

fn set_device_uuid(&self, value: Option<Vec<u8>>)

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
Source§

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

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.