aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-11-05 12:54:06 +0100
committerSimon Ser <contact@emersion.fr>2021-11-08 15:57:19 +0000
commitfa77aeb80e70fba09bb0f0d42045dfc6ce1ce1a9 (patch)
treea602f338f34408f1983ff79ae6521e1b5fdafc54
parentf20c49d78a5406a0678e2f911f26965a479bf73f (diff)
screencopy-v1: stop using wlr_output_export_dmabuf
-rw-r--r--types/wlr_screencopy_v1.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c
index 04dd9e3d..7c7d7e95 100644
--- a/types/wlr_screencopy_v1.c
+++ b/types/wlr_screencopy_v1.c
@@ -489,13 +489,12 @@ static struct wlr_screencopy_v1_client *client_from_resource(
}
static uint32_t get_output_fourcc(struct wlr_output *output) {
- struct wlr_dmabuf_attributes attr = { 0 };
- if (!wlr_output_export_dmabuf(output, &attr)) {
+ struct wlr_dmabuf_attributes attr = {0};
+ if (!output->front_buffer ||
+ !wlr_buffer_get_dmabuf(output->front_buffer, &attr)) {
return DRM_FORMAT_INVALID;
}
- uint32_t format = attr.format;
- wlr_dmabuf_attributes_finish(&attr);
- return format;
+ return attr.format;
}
static void capture_output(struct wl_client *wl_client,