diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-11-30 20:01:12 -0500 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-11-30 20:01:12 -0500 |
commit | c5a3c5ca4cc4ee664bb4b4edad77dba8c36b0a21 (patch) | |
tree | f693358d1a1502fbab143eeb06eb3944f693812a /render/pixman | |
parent | 57b18d26d09f5219fe0458dcdd06fd2c817c294e (diff) |
render: Implement texture_preferred_read_format
Diffstat (limited to 'render/pixman')
-rw-r--r-- | render/pixman/renderer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/render/pixman/renderer.c b/render/pixman/renderer.c index 2c92e662..13049e8f 100644 --- a/render/pixman/renderer.c +++ b/render/pixman/renderer.c @@ -115,8 +115,16 @@ static bool texture_read_pixels(struct wlr_texture *wlr_texture, return true; } +static uint32_t pixman_texture_preferred_read_format(struct wlr_texture *wlr_texture) { + struct wlr_pixman_texture *texture = get_texture(wlr_texture); + + pixman_format_code_t pixman_format = pixman_image_get_format(texture->image); + return get_drm_format_from_pixman(pixman_format); +} + static const struct wlr_texture_impl texture_impl = { .read_pixels = texture_read_pixels, + .preferred_read_format = pixman_texture_preferred_read_format, .destroy = texture_destroy, }; |