aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-02-16 19:30:26 +0100
committerSimon Ser <contact@emersion.fr>2021-02-23 16:09:26 +0100
commit00bf6674b35bc4f3a5adaceaebab33f734b2ecd9 (patch)
tree5b98c9e02fe63c0cced70a33333a10943490682f /render/gles2
parentddfee63055d53b975039e768cdb5ee3ea92ab5ab (diff)
output: use DRM format in wlr_output_preferred_read_format
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index d6dc8dbc..68d53998 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -1,4 +1,5 @@
#include <assert.h>
+#include <drm_fourcc.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdint.h>
@@ -434,7 +435,7 @@ static const struct wlr_drm_format_set *gles2_get_dmabuf_render_formats(
return wlr_egl_get_dmabuf_render_formats(renderer->egl);
}
-static enum wl_shm_format gles2_preferred_read_format(
+static uint32_t gles2_preferred_read_format(
struct wlr_renderer *wlr_renderer) {
struct wlr_gles2_renderer *renderer =
gles2_get_renderer_in_context(wlr_renderer);
@@ -456,13 +457,13 @@ static enum wl_shm_format gles2_preferred_read_format(
const struct wlr_gles2_pixel_format *fmt =
get_gles2_format_from_gl(gl_format, gl_type, alpha_size > 0);
if (fmt != NULL) {
- return convert_drm_format_to_wl_shm(fmt->drm_format);
+ return fmt->drm_format;
}
if (renderer->exts.read_format_bgra_ext) {
- return WL_SHM_FORMAT_XRGB8888;
+ return DRM_FORMAT_XRGB8888;
}
- return WL_SHM_FORMAT_XBGR8888;
+ return DRM_FORMAT_XBGR8888;
}
static bool gles2_read_pixels(struct wlr_renderer *wlr_renderer,