Skip to main content

IExternalObjectsRenderInterfaceContextFeature

Trait IExternalObjectsRenderInterfaceContextFeature 

Source
pub trait IExternalObjectsRenderInterfaceContextFeature {
    // Required methods
    fn supported_image_handle_types(&self) -> Vec<String>;
    fn supported_semaphore_types(&self) -> Vec<String>;
    fn import_image(
        &self,
        handle: Rc<dyn IPlatformHandle>,
        properties: PlatformGraphicsExternalImageProperties,
    ) -> Rc<dyn IPlatformRenderInterfaceImportedImage>;
    fn import_shared_image(
        &self,
        image: Arc<dyn ICompositionImportableSharedGpuContextImage>,
    ) -> Rc<dyn IPlatformRenderInterfaceImportedImage>;
    fn import_semaphore(
        &self,
        handle: Rc<dyn IPlatformHandle>,
    ) -> Rc<dyn IPlatformRenderInterfaceImportedSemaphore>;
    fn get_synchronization_capabilities(
        &self,
        image_handle_type: &str,
    ) -> CompositionGpuImportedImageSynchronizationCapabilities;
    fn device_uuid(&self) -> Option<Vec<u8>>;
    fn device_luid(&self) -> 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 render context: a feature of the render interface context.

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 import_image( &self, handle: Rc<dyn IPlatformHandle>, properties: PlatformGraphicsExternalImageProperties, ) -> Rc<dyn IPlatformRenderInterfaceImportedImage>

Source

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

Imports an image of a context that shares with this one. The image is shared with the thread that made it, which keeps it and disposes it: this is called on the thread that renders.

Source

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

Source

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

Source

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

Source

fn device_luid(&self) -> 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§