-
- Downloads
color: structurize parametric curve data
Rather than using a two-dimensional array, provide names to the fields.
The fields are primarily used by their names, but we also need the data
as a flat array of floats, so use unions to achieve that: two different
views into the same data.
This makes the code more self-explanatory. In color-operations.c it
removes a handful of temporaries. Comparison in color-properties.c is
simplified. ARRAY_COPY() turns into an assignment.
MAX_PARAMS_PARAM_CURVE is eliminated. Instead of having to maintain a
copy in fragment.glsl, the definition there is automated.
Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
Showing
- libweston/color-lcms/color-transform.c 21 additions, 21 deletionslibweston/color-lcms/color-transform.c
- libweston/color-operations.c 19 additions, 31 deletionslibweston/color-operations.c
- libweston/color-properties.c 13 additions, 15 deletionslibweston/color-properties.c
- libweston/color.c 7 additions, 8 deletionslibweston/color.c
- libweston/color.h 23 additions, 10 deletionslibweston/color.h
- libweston/renderer-gl/fragment.glsl 1 addition, 1 deletionlibweston/renderer-gl/fragment.glsl
- libweston/renderer-gl/gl-renderer-internal.h 2 additions, 2 deletionslibweston/renderer-gl/gl-renderer-internal.h
- libweston/renderer-gl/gl-shader-config-color-transformation.c 5 additions, 6 deletions...eston/renderer-gl/gl-shader-config-color-transformation.c
- libweston/renderer-gl/gl-shaders.c 6 additions, 4 deletionslibweston/renderer-gl/gl-shaders.c
Loading
Please register or sign in to comment