Function import_copy_target
pub fn import_copy_target(
device: &Device,
image: &DmabufRef<'_>,
) -> Result<ImportedRenderTarget, ImportError>Expand description
Import the one linear plane of an ABGR8888/XBGR8888 dma-buf as a
texture a frame is copied into (COPY_DST).
The render service draws each app’s frame into a retained Rgba8Unorm
target and copies what changed into the buffer the app then attaches to
its surface. These formats store R, G, B, A bytes in memory order, which is
Rgba8Unorm, so that copy is a plain copy_texture_to_texture with no
format conversion, and the compositor composites or scans the buffer out
as it would any client’s.
With VK_EXT_image_drm_format_modifier the producer’s exact row pitch is
used (a GBM buffer’s pitch is aligned for scanout); without it the
driver’s own linear pitch has to agree.
§Errors
As import_render_target, for another format or a tiled layout.