mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
render/pixel-format: add support for block-based formats
Some formats like sub-sampled YCbCr use a block of bytes to store the color values for more than one pixel. Update our format table to be able to handle such formats.
This commit is contained in:
parent
78a1ac540e
commit
96f3f3c92e
9 changed files with 117 additions and 56 deletions
|
|
@ -550,7 +550,7 @@ static void capture_output(struct wl_client *wl_client,
|
|||
}
|
||||
|
||||
frame->box = buffer_box;
|
||||
frame->shm_stride = (shm_info->bpp / 8) * buffer_box.width;
|
||||
frame->shm_stride = pixel_format_info_min_stride(shm_info, buffer_box.width);
|
||||
|
||||
zwlr_screencopy_frame_v1_send_buffer(frame->resource,
|
||||
convert_drm_format_to_wl_shm(frame->shm_format),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue