diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h index 62da0761..bb9a55fc 100644 --- a/include/wlr/render/wlr_renderer.h +++ b/include/wlr/render/wlr_renderer.h @@ -40,6 +40,13 @@ struct wlr_renderer { struct wl_signal lost; } events; + struct { + /** + * Does the renderer support color transforms on its output? + */ + bool output_color_transform; + } features; + // private state const struct wlr_renderer_impl *impl; diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 7bb9cf34..4694b2a8 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -526,6 +526,7 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) { return NULL; } wlr_renderer_init(&renderer->wlr_renderer, &renderer_impl, WLR_BUFFER_CAP_DMABUF); + renderer->wlr_renderer.features.output_color_transform = false; wl_list_init(&renderer->buffers); wl_list_init(&renderer->textures); diff --git a/render/pixman/renderer.c b/render/pixman/renderer.c index 552c9bf9..a5b83e38 100644 --- a/render/pixman/renderer.c +++ b/render/pixman/renderer.c @@ -327,6 +327,7 @@ struct wlr_renderer *wlr_pixman_renderer_create(void) { wlr_log(WLR_INFO, "Creating pixman renderer"); wlr_renderer_init(&renderer->wlr_renderer, &renderer_impl, WLR_BUFFER_CAP_DATA_PTR); + renderer->wlr_renderer.features.output_color_transform = false; wl_list_init(&renderer->buffers); wl_list_init(&renderer->textures); diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c index c6c249b2..3c239cb1 100644 --- a/render/vulkan/renderer.c +++ b/render/vulkan/renderer.c @@ -2403,6 +2403,7 @@ struct wlr_renderer *vulkan_renderer_create_for_device(struct wlr_vk_device *dev renderer->dev = dev; wlr_renderer_init(&renderer->wlr_renderer, &renderer_impl, WLR_BUFFER_CAP_DMABUF); + renderer->wlr_renderer.features.output_color_transform = true; wl_list_init(&renderer->stage.buffers); wl_list_init(&renderer->foreign_textures); wl_list_init(&renderer->textures);