Skip to main content

ICompositionGpuInterop

Trait ICompositionGpuInterop 

Source
pub trait ICompositionGpuInterop {
Show 13 methods // Required methods fn supported_image_handle_types(&self) -> Vec<String>; fn supported_semaphore_types(&self) -> Vec<String>; fn get_synchronization_capabilities( &self, image_handle_type: &str, ) -> CompositionGpuImportedImageSynchronizationCapabilities; fn import_image( &self, handle: Rc<dyn IPlatformHandle>, properties: PlatformGraphicsExternalImageProperties, ) -> Rc<dyn ICompositionImportedGpuImage>; fn import_shared_image( &self, image: Arc<dyn ICompositionImportableSharedGpuContextImage>, ) -> Rc<dyn ICompositionImportedGpuImage>; fn import_semaphore( &self, handle: Rc<dyn IPlatformHandle>, ) -> Rc<dyn ICompositionImportedGpuSemaphore>; fn import_shared_semaphore( &self, image: Rc<dyn ICompositionImportableSharedGpuContextSemaphore>, ) -> Rc<dyn ICompositionImportedGpuImage>; fn is_lost(&self) -> bool; fn device_luid(&self) -> Option<Vec<u8>>; fn set_device_luid(&self, value: Option<Vec<u8>>); fn device_uuid(&self) -> Option<Vec<u8>>; fn set_device_uuid(&self, value: Option<Vec<u8>>); // Provided method fn supported_dma_buf_formats( &self, ) -> Option<Vec<PlatformGraphicsDrmFormat>> { ... }
}
Expand description

The import of GPU objects created outside of the framework into the compositor.

Required Methods§

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

image is an image that belongs to the same GPU context or the same GPU context sharing group as one used by compositor

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 import_shared_semaphore( &self, image: Rc<dyn ICompositionImportableSharedGpuContextSemaphore>, ) -> Rc<dyn ICompositionImportedGpuImage>

Asynchronously imports a semaphore object. The returned object is immediately usable.

image is a semaphore that belongs to the same GPU context or the same GPU context sharing group as one used by compositor

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>>)

Provided Methods§

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§