mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-13 14:32:57 -04:00
Merge branch 'render' into 'master'
render: general color_transform for wlr_render_pass_add_texture() See merge request wlroots/wlroots!5260
This commit is contained in:
commit
ed3c145f94
12 changed files with 544 additions and 151 deletions
|
|
@ -127,6 +127,13 @@ struct wlr_color_transform;
|
|||
struct wlr_color_transform *wlr_color_transform_init_linear_to_icc(
|
||||
const void *data, size_t size);
|
||||
|
||||
/**
|
||||
* Initialize a color transformation to apply EOTF decoding. Returns
|
||||
* NULL on failure.
|
||||
*/
|
||||
struct wlr_color_transform *wlr_color_transform_init_eotf_to_linear(
|
||||
enum wlr_color_transfer_function tf);
|
||||
|
||||
/**
|
||||
* Initialize a color transformation to apply EOTF⁻¹ encoding. Returns
|
||||
* NULL on failure.
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@ struct wlr_render_timer;
|
|||
struct wlr_buffer_pass_options {
|
||||
/* Timer to measure the duration of the render pass */
|
||||
struct wlr_render_timer *timer;
|
||||
/* Color transform to apply to the output of the render pass.
|
||||
* Leave NULL to indicate the default transform (Gamma 2.2 encoding for
|
||||
* sRGB monitors) */
|
||||
/* Color transform to apply to the output of the render pass */
|
||||
struct wlr_color_transform *color_transform;
|
||||
|
||||
/* Signal a timeline synchronization point when the render pass completes.
|
||||
|
|
@ -101,16 +99,12 @@ struct wlr_render_texture_options {
|
|||
enum wlr_scale_filter_mode filter_mode;
|
||||
/* Blend mode */
|
||||
enum wlr_render_blend_mode blend_mode;
|
||||
/* Transfer function the source texture is encoded with */
|
||||
enum wlr_color_transfer_function transfer_function;
|
||||
/* Primaries describing the color volume of the source texture */
|
||||
const struct wlr_color_primaries *primaries;
|
||||
/* Applied to convert from source texture to blend space */
|
||||
struct wlr_color_transform *color_transform;
|
||||
/* Color encoding of the source texture for YCbCr conversion to RGB */
|
||||
enum wlr_color_encoding color_encoding;
|
||||
/* Color range of the source texture */
|
||||
enum wlr_color_range color_range;
|
||||
/* Default: 1.0 */
|
||||
const float *luminance_multiplier;
|
||||
|
||||
/* Wait for a timeline synchronization point before texturing.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ struct wlr_output_cursor {
|
|||
|
||||
struct {
|
||||
struct wl_listener renderer_destroy;
|
||||
struct wlr_color_transform *color_transform;
|
||||
struct wlr_color_transform *color_transform_linearize;
|
||||
struct wlr_color_transform *color_transform_encode;
|
||||
} WLR_PRIVATE;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@ struct wlr_scene {
|
|||
bool direct_scanout;
|
||||
bool calculate_visibility;
|
||||
bool highlight_transparent_region;
|
||||
|
||||
struct wlr_scene_color_transform_cache *color_transform_cache;
|
||||
} WLR_PRIVATE;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue