mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-26 06:46:56 -04:00
color management
This commit is contained in:
parent
842df2bd6c
commit
10bf68b928
13 changed files with 401 additions and 59 deletions
19
include/wlr/render/color.h
Normal file
19
include/wlr/render/color.h
Normal 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
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ struct wlr_surface {
|
|||
|
||||
struct wl_listener renderer_destroy;
|
||||
|
||||
struct wlr_color_config *color;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue