color management

This commit is contained in:
Devin Bayer 2020-07-14 17:01:25 +00:00
parent 842df2bd6c
commit 10bf68b928
13 changed files with 401 additions and 59 deletions

View file

@ -0,0 +1,19 @@
#ifndef _WLR_COLOR_H
#define _WLR_COLOR_H
struct wlr_color_config {
char *icc_profile_path; // not null
};
/**
* Create a color config.
*
* icc_profile_path should not be NULL.
* It will be copied into the config.
*/
struct wlr_color_config *wlr_color_config_load(const char *icc_profile_path);
struct wlr_color_config *wlr_color_config_copy(struct wlr_color_config *value);
void wlr_color_config_free(struct wlr_color_config *config);
#endif

View file

@ -24,6 +24,7 @@ struct wlr_drm_format_set;
struct wlr_renderer {
const struct wlr_renderer_impl *impl;
struct wlr_color_config *color;
bool rendering;

View file

@ -12,12 +12,16 @@
#include <stdint.h>
#include <wayland-server-protocol.h>
#include <wlr/render/dmabuf.h>
#include <wlr/render/color.h>
struct wlr_renderer;
struct wlr_texture_impl;
struct wlr_texture {
const struct wlr_texture_impl *impl;
struct wlr_color_config *color;
struct wlr_texture *colored;
uint32_t width, height;
};