From e42178d03fd34f9f5fba10feabfc4b35a71edd31 Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 1 Apr 2019 19:17:23 +0300 Subject: render: switch wlr_renderer to wlr_drm_format_set --- render/wlr_renderer.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'render/wlr_renderer.c') diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index 58731d7f..802cbdbd 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -123,20 +123,12 @@ void wlr_renderer_wl_drm_buffer_get_size(struct wlr_renderer *r, return r->impl->wl_drm_buffer_get_size(r, buffer, width, height); } -int wlr_renderer_get_dmabuf_formats(struct wlr_renderer *r, - int **formats) { +const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_formats( + struct wlr_renderer *r) { if (!r->impl->get_dmabuf_formats) { - return -1; - } - return r->impl->get_dmabuf_formats(r, formats); -} - -int wlr_renderer_get_dmabuf_modifiers(struct wlr_renderer *r, int format, - uint64_t **modifiers) { - if (!r->impl->get_dmabuf_modifiers) { - return -1; + return NULL; } - return r->impl->get_dmabuf_modifiers(r, format, modifiers); + return r->impl->get_dmabuf_formats(r); } bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt, -- cgit v1.2.3