mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-29 10:32:29 +00:00
screencopy-v1: rename wlr_screencopy_frame_v1.stride
Make it clear it's only about shm, not about DMA-BUFs.
This commit is contained in:
parent
77b829e15f
commit
f03da48491
@ -39,7 +39,7 @@ struct wlr_screencopy_frame_v1 {
|
|||||||
|
|
||||||
uint32_t shm_format, dmabuf_format; // DRM format codes
|
uint32_t shm_format, dmabuf_format; // DRM format codes
|
||||||
struct wlr_box box;
|
struct wlr_box box;
|
||||||
int stride;
|
int shm_stride;
|
||||||
|
|
||||||
bool overlay_cursor, cursor_locked;
|
bool overlay_cursor, cursor_locked;
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ static void frame_handle_copy(struct wl_client *wl_client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t stride = wl_shm_buffer_get_stride(shm_buffer);
|
int32_t stride = wl_shm_buffer_get_stride(shm_buffer);
|
||||||
if (stride != frame->stride) {
|
if (stride != frame->shm_stride) {
|
||||||
wl_resource_post_error(frame->resource,
|
wl_resource_post_error(frame->resource,
|
||||||
ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER,
|
ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER,
|
||||||
"invalid buffer stride");
|
"invalid buffer stride");
|
||||||
@ -578,11 +578,11 @@ static void capture_output(struct wl_client *wl_client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
frame->box = buffer_box;
|
frame->box = buffer_box;
|
||||||
frame->stride = (shm_info->bpp / 8) * buffer_box.width;
|
frame->shm_stride = (shm_info->bpp / 8) * buffer_box.width;
|
||||||
|
|
||||||
zwlr_screencopy_frame_v1_send_buffer(frame->resource,
|
zwlr_screencopy_frame_v1_send_buffer(frame->resource,
|
||||||
convert_drm_format_to_wl_shm(frame->shm_format),
|
convert_drm_format_to_wl_shm(frame->shm_format),
|
||||||
buffer_box.width, buffer_box.height, frame->stride);
|
buffer_box.width, buffer_box.height, frame->shm_stride);
|
||||||
|
|
||||||
if (version >= 3) {
|
if (version >= 3) {
|
||||||
if (frame->dmabuf_format != DRM_FORMAT_INVALID) {
|
if (frame->dmabuf_format != DRM_FORMAT_INVALID) {
|
||||||
|
Loading…
Reference in New Issue
Block a user