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:
Simon Ser 2022-09-21 10:12:59 +02:00 committed by Simon Zeni
parent 77b829e15f
commit f03da48491
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ struct wlr_screencopy_frame_v1 {
uint32_t shm_format, dmabuf_format; // DRM format codes
struct wlr_box box;
int stride;
int shm_stride;
bool overlay_cursor, cursor_locked;

View File

@ -391,7 +391,7 @@ static void frame_handle_copy(struct wl_client *wl_client,
}
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,
ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER,
"invalid buffer stride");
@ -578,11 +578,11 @@ static void capture_output(struct wl_client *wl_client,
}
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,
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 (frame->dmabuf_format != DRM_FORMAT_INVALID) {