aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_texture.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-23 00:03:26 +0100
committeremersion <contact@emersion.fr>2018-05-29 18:47:17 +0100
commit5ba1a9af5652aa2407738ec6290e7a9a59a86ea6 (patch)
tree13b44184db8f3e2b32f1b1205aa6a9997065dab8 /render/wlr_texture.c
parentbd430b8620f5dec485e49269d6add8dc3c20a8ab (diff)
render: add wlr_texture_to_dmabuf
Diffstat (limited to 'render/wlr_texture.c')
-rw-r--r--render/wlr_texture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index 9aecfd98..f7ce0b44 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -54,3 +54,11 @@ bool wlr_texture_write_pixels(struct wlr_texture *texture,
return texture->impl->write_pixels(texture, wl_fmt, stride, width, height,
src_x, src_y, dst_x, dst_y, data);
}
+
+bool wlr_texture_to_dmabuf(struct wlr_texture *texture,
+ struct wlr_dmabuf_buffer_attribs *attribs) {
+ if (!texture->impl->to_dmabuf) {
+ return false;
+ }
+ return texture->impl->to_dmabuf(texture, attribs);
+}