Trait webrender::MappableCompositor

source ·
pub trait MappableCompositor: Compositor {
    // Required methods
    fn map_tile(
        &mut self,
        device: &mut Device,
        id: NativeTileId,
        dirty_rect: DeviceIntRect,
        valid_rect: DeviceIntRect,
    ) -> Option<MappedTileInfo>;
    fn unmap_tile(&mut self, device: &mut Device);
    fn lock_composite_surface(
        &mut self,
        device: &mut Device,
        ctx: *mut c_void,
        external_image_id: ExternalImageId,
        composite_info: *mut SWGLCompositeSurfaceInfo,
    ) -> bool;
    fn unlock_composite_surface(
        &mut self,
        device: &mut Device,
        ctx: *mut c_void,
        external_image_id: ExternalImageId,
    );
}
Expand description

A Compositor variant that supports mapping tiles into CPU memory.

Required Methods§

source

fn map_tile( &mut self, device: &mut Device, id: NativeTileId, dirty_rect: DeviceIntRect, valid_rect: DeviceIntRect, ) -> Option<MappedTileInfo>

Map a tile’s underlying buffer so it can be used as the backing for a SWGL framebuffer. This is intended to be a replacement for ‘bind’ in any compositors that intend to directly interoperate with SWGL while supporting some form of native layers.

source

fn unmap_tile(&mut self, device: &mut Device)

Unmap a tile that was was previously mapped via map_tile to signal that SWGL is done rendering to the buffer.

source

fn lock_composite_surface( &mut self, device: &mut Device, ctx: *mut c_void, external_image_id: ExternalImageId, composite_info: *mut SWGLCompositeSurfaceInfo, ) -> bool

source

fn unlock_composite_surface( &mut self, device: &mut Device, ctx: *mut c_void, external_image_id: ExternalImageId, )

Implementors§