mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-20 00:58:10 +02:00
color-lcms: prefix color_transform_step values
I will be adding a MAPPING value, and it would look odd without any prefix. This adds a bit of namespacing. The definition is moved to the header, because I will be needing it in struct cmlcms_color_transform. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
0974359b8f
commit
dfea094772
2 changed files with 12 additions and 13 deletions
|
|
@ -189,6 +189,10 @@ cmlcms_get_parametric_color_profile(struct weston_color_profile *cprof_base,
|
|||
void
|
||||
cmlcms_destroy_color_profile(struct weston_color_profile *cprof_base);
|
||||
|
||||
enum color_transform_step {
|
||||
STEP_PRE_CURVE,
|
||||
STEP_POST_CURVE,
|
||||
};
|
||||
|
||||
struct cmlcms_color_transform_recipe {
|
||||
enum cmlcms_category category;
|
||||
|
|
|
|||
|
|
@ -794,11 +794,6 @@ err:
|
|||
return false;
|
||||
}
|
||||
|
||||
enum color_transform_step {
|
||||
PRE_CURVE,
|
||||
POST_CURVE,
|
||||
};
|
||||
|
||||
static bool
|
||||
translate_curve_element_parametric(struct cmlcms_color_transform *xform,
|
||||
_cmsStageToneCurvesData *trc_data,
|
||||
|
|
@ -811,11 +806,11 @@ translate_curve_element_parametric(struct cmlcms_color_transform *xform,
|
|||
bool clamped_input;
|
||||
bool ret;
|
||||
|
||||
switch(step) {
|
||||
case PRE_CURVE:
|
||||
switch (step) {
|
||||
case STEP_PRE_CURVE:
|
||||
curve = &xform->base.pre_curve;
|
||||
break;
|
||||
case POST_CURVE:
|
||||
case STEP_POST_CURVE:
|
||||
curve = &xform->base.post_curve;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -866,13 +861,13 @@ translate_curve_element_LUT(struct cmlcms_color_transform *xform,
|
|||
cmsToneCurve **stash;
|
||||
unsigned i;
|
||||
|
||||
switch(step) {
|
||||
case PRE_CURVE:
|
||||
switch (step) {
|
||||
case STEP_PRE_CURVE:
|
||||
curve = &xform->base.pre_curve;
|
||||
curve->u.lut_3x1d.fill_in = cmlcms_fill_in_pre_curve;
|
||||
stash = xform->pre_curve;
|
||||
break;
|
||||
case POST_CURVE:
|
||||
case STEP_POST_CURVE:
|
||||
curve = &xform->base.post_curve;
|
||||
curve->u.lut_3x1d.fill_in = cmlcms_fill_in_post_curve;
|
||||
stash = xform->post_curve;
|
||||
|
|
@ -960,7 +955,7 @@ translate_pipeline(struct cmlcms_color_transform *xform, const cmsPipeline *lut)
|
|||
return true;
|
||||
|
||||
if (cmsStageType(elem) == cmsSigCurveSetElemType) {
|
||||
if (!translate_curve_element(xform, elem, PRE_CURVE))
|
||||
if (!translate_curve_element(xform, elem, STEP_PRE_CURVE))
|
||||
return false;
|
||||
|
||||
elem = cmsStageNext(elem);
|
||||
|
|
@ -980,7 +975,7 @@ translate_pipeline(struct cmlcms_color_transform *xform, const cmsPipeline *lut)
|
|||
return true;
|
||||
|
||||
if (cmsStageType(elem) == cmsSigCurveSetElemType) {
|
||||
if (!translate_curve_element(xform, elem, POST_CURVE))
|
||||
if (!translate_curve_element(xform, elem, STEP_POST_CURVE))
|
||||
return false;
|
||||
|
||||
elem = cmsStageNext(elem);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue