aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-11-30 19:55:12 -0500
committerAlexander Orzechowski <alex@ozal.ski>2023-11-30 19:55:12 -0500
commit4c6caa7c48d887fb4292a08f898af83d9954d571 (patch)
tree52aef9a12546f680183f3cf25015c9c2104253f6 /render
parenta165261f7f099475547b54bafd78a4465728a5cd (diff)
wlr_texture: Introduce wlr_texture_read_pixels
Diffstat (limited to 'render')
-rw-r--r--render/wlr_texture.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index 8c003cfb..be10f20a 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -26,6 +26,15 @@ void wlr_texture_destroy(struct wlr_texture *texture) {
}
}
+bool wlr_texture_read_pixels(struct wlr_texture *texture,
+ const struct wlr_texture_read_pixels_options *options) {
+ if (!texture->impl->read_pixels) {
+ return false;
+ }
+
+ return texture->impl->read_pixels(texture, options);
+}
+
struct wlr_texture *wlr_texture_from_pixels(struct wlr_renderer *renderer,
uint32_t fmt, uint32_t stride, uint32_t width, uint32_t height,
const void *data) {