MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ readback_swapchain_region

std::function<bool( const std::shared_ptr<void>& window_handle, void* dst, uint32_t x_offset, uint32_t y_offset, uint32_t pixel_width, uint32_t pixel_height, size_t byte_count)> MayaFlux::Registry::Service::DisplayService::readback_swapchain_region

Copy a sub-rectangle of the last presented swapchain image into a caller-supplied host buffer.

Internally calls BackendResourceManager::download_image_data with restore_layout = ePresentSrcKHR and restore_stage = eBottomOfPipe, which are the correct values for a swapchain image post-present.

The destination buffer must be at least pixel_width * pixel_height * bytes_per_pixel bytes.

Parameters
window_handleWindow whose last presented image is the source.
dstHost-visible destination pointer.
x_offsetLeft edge of the source rectangle in pixels.
y_offsetTop edge of the source rectangle in pixels.
pixel_widthWidth of the rectangle in pixels.
pixel_heightHeight of the rectangle in pixels.
byte_countTotal bytes to read (width * height * bpp).
Returns
true if the copy completed successfully.

Definition at line 134 of file DisplayService.hpp.