mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
renderer: add field to indicate color transform support
This commit is contained in:
parent
391410deb5
commit
82b4bc3f5f
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user