diff options
author | Simon Ser <contact@emersion.fr> | 2022-09-21 10:12:59 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-09-22 18:01:52 +0000 |
commit | f03da4849197363b8ab5de0ee2e205c2d44e1634 (patch) | |
tree | 81c9e716802bbf26a904beca3039d709e82dcbdd | |
parent | 77b829e15fcbe14598a34ec3a420a652d1aee74a (diff) | |
download | wlroots-f03da4849197363b8ab5de0ee2e205c2d44e1634.tar.xz |
screencopy-v1: rename wlr_screencopy_frame_v1.stride
Make it clear it's only about shm, not about DMA-BUFs.
-rw-r--r-- | include/wlr/types/wlr_screencopy_v1.h | 2 | ||||
-rw-r--r-- | types/wlr_screencopy_v1.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/wlr/types/wlr_screencopy_v1.h b/include/wlr/types/wlr_screencopy_v1.h index 26b4eef1..c74b8ecc 100644 --- a/include/wlr/types/wlr_screencopy_v1.h +++ b/include/wlr/types/wlr_screencopy_v1.h @@ -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; diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c index a1601dda..6c07889d 100644 --- a/types/wlr_screencopy_v1.c +++ b/types/wlr_screencopy_v1.c @@ -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) { |