aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndri Yngvason <andri@yngvason.is>2020-06-28 13:49:44 +0000
committerSimon Ser <contact@emersion.fr>2020-07-01 11:43:02 +0200
commit1d835f20352d55ae4e4dd2d62992c32e76562aac (patch)
treeb08bb38aff58e43c47dcb65c69aa2103a07349a1
parente05a85327ff17d00d30b8e03c9f7f5f6d2e4c441 (diff)
downloadwlroots-1d835f20352d55ae4e4dd2d62992c32e76562aac.tar.xz
screencopy: Use correct dmabuf to get y-inversion flag
Because wlr_renderer_blit_dmabuf() undoes y-inversion on the source buffer, it is incorrect to pass the y-inversion flag of the source buffer to the user.
-rw-r--r--types/wlr_screencopy_v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c
index 0a5b2bd2..702a62b5 100644
--- a/types/wlr_screencopy_v1.c
+++ b/types/wlr_screencopy_v1.c
@@ -208,7 +208,7 @@ static void frame_handle_output_precommit(struct wl_listener *listener,
ok = wlr_output_export_dmabuf(frame->output, &attr);
ok = ok && wlr_renderer_blit_dmabuf(renderer,
&dma_buffer->attributes, &attr);
- flags |= attr.flags & WLR_DMABUF_ATTRIBUTES_FLAGS_Y_INVERT ?
+ flags |= dma_buffer->attributes.flags & WLR_DMABUF_ATTRIBUTES_FLAGS_Y_INVERT ?
ZWLR_SCREENCOPY_FRAME_V1_FLAGS_Y_INVERT : 0;
wlr_dmabuf_attributes_finish(&attr);
}