From ddfee63055d53b975039e768cdb5ee3ea92ab5ab Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 16 Feb 2021 19:20:00 +0100 Subject: render: use DRM formats in wlr_renderer_get_shm_texture_formats --- render/gles2/pixel_format.c | 9 ++++----- render/gles2/renderer.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'render/gles2') diff --git a/render/gles2/pixel_format.c b/render/gles2/pixel_format.c index d7711caa..4ca98fe9 100644 --- a/render/gles2/pixel_format.c +++ b/render/gles2/pixel_format.c @@ -2,7 +2,6 @@ #include #include #include "render/gles2.h" -#include "render/shm_format.h" /* * The DRM formats are little endian while the GL formats are big endian, @@ -66,11 +65,11 @@ const struct wlr_gles2_pixel_format *get_gles2_format_from_gl( return NULL; } -const enum wl_shm_format *get_gles2_wl_formats(size_t *len) { - static enum wl_shm_format wl_formats[sizeof(formats) / sizeof(formats[0])]; +const uint32_t *get_gles2_shm_formats(size_t *len) { + static uint32_t shm_formats[sizeof(formats) / sizeof(formats[0])]; *len = sizeof(formats) / sizeof(formats[0]); for (size_t i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { - wl_formats[i] = convert_drm_format_to_wl_shm(formats[i].drm_format); + shm_formats[i] = formats[i].drm_format; } - return wl_formats; + return shm_formats; } diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index fa7bc6c7..d6dc8dbc 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -389,9 +389,9 @@ static void gles2_render_ellipse_with_matrix(struct wlr_renderer *wlr_renderer, pop_gles2_debug(renderer); } -static const enum wl_shm_format *gles2_get_shm_texture_formats( +static const uint32_t *gles2_get_shm_texture_formats( struct wlr_renderer *wlr_renderer, size_t *len) { - return get_gles2_wl_formats(len); + return get_gles2_shm_formats(len); } static bool gles2_resource_is_wl_drm_buffer(struct wlr_renderer *wlr_renderer, -- cgit v1.2.3