From 35444bf35a56805029a090a408d5a51464803cae Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 21 May 2014 07:43:09 +0200 Subject: m + add gamma sets with mapping function rather than lookup tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libgamma-method.h | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'src/libgamma-method.h') diff --git a/src/libgamma-method.h b/src/libgamma-method.h index 1f54f62..8e953b3 100644 --- a/src/libgamma-method.h +++ b/src/libgamma-method.h @@ -148,10 +148,18 @@ typedef struct libgamma_method_capabilities { * Whether the adjustment method supports `libgamma_crtc_restore` */ int crtc_restore : 1; + + /** + * Whether the `red_gamma_size`, `green_gamma_size` and `blue_gamma_size` + * fields in `libgamma_crtc_information_t` will always have the same + * values as each other for the adjustment method + */ + int identical_gamma_sizes : 1; /** - * Whether the `gamma_size` field in `libgamma_crtc_information_t` - * will always be filled with the same value for the adjustment method + * Whether the `red_gamma_size`, `green_gamma_size` and `blue_gamma_size` + * fields in `libgamma_crtc_information_t` will always be filled with the + * same value for the adjustment method */ int fixed_gamma_size : 1; @@ -324,7 +332,8 @@ typedef struct libgamma_crtc_state { /** * For a `libgamma_crtc_information_t` fill in the - * value for `gamma_size` and report errors to `gamma_size_error` + * values for `red_gamma_size`, `green_gamma_size` and `blue_gamma_size` + * and report errors to `gamma_size_error` */ #define CRTC_INFO_GAMMA_SIZE (1 << 5) @@ -477,9 +486,19 @@ typedef struct libgamma_crtc_information { /** - * The size of the encoding axes of gamma ramps + * The size of the encoding axis of the red gamma ramp + */ + size_t red_gamma_size; + + /** + * The size of the encoding axis of the green gamma ramp + */ + size_t green_gamma_size; + + /** + * The size of the encoding axis of the blue gamma ramp */ - size_t gamma_size; + size_t blue_gamma_size; /** * Zero on success, positive it holds the value `errno` had @@ -790,17 +809,17 @@ typedef struct libgamma_gamma_rampsd /** * The gamma ramp for the red channel */ - float* red; + double* red; /** * The gamma ramp for the green channel */ - float* green; + double* green; /** * The gamma ramp for the blue channel */ - float* blue; + double* blue; } libgamma_gamma_rampsd_t; -- cgit v1.2.3-70-g09d2