diff --git a/clutter/clutter/clutter-color-state-params.c b/clutter/clutter/clutter-color-state-params.c index bbaa4b04b..45ab257d1 100644 --- a/clutter/clutter/clutter-color-state-params.c +++ b/clutter/clutter/clutter-color-state-params.c @@ -1621,7 +1621,10 @@ clutter_color_state_params_new_full (ClutterContext *context, { color_state_params->luminance.type = CLUTTER_LUMINANCE_TYPE_EXPLICIT; color_state_params->luminance.min = min_lum; - color_state_params->luminance.max = max_lum; + if (transfer_function == CLUTTER_TRANSFER_FUNCTION_PQ) + color_state_params->luminance.max = min_lum + 10000.0f; + else + color_state_params->luminance.max = max_lum; color_state_params->luminance.ref = ref_lum; } else diff --git a/src/tests/wayland-color-management-test.c b/src/tests/wayland-color-management-test.c index 3ae575213..65e3921fe 100644 --- a/src/tests/wayland-color-management-test.c +++ b/src/tests/wayland-color-management-test.c @@ -105,7 +105,7 @@ color_management (void) lum = clutter_color_state_params_get_luminance (color_state_params); g_assert_cmpuint (lum->type, ==, CLUTTER_LUMINANCE_TYPE_EXPLICIT); g_assert_cmpfloat_with_epsilon (lum->min, 0.005f, TEST_COLOR_EPSILON); - g_assert_cmpfloat_with_epsilon (lum->max, 10000.0f, TEST_COLOR_EPSILON); + g_assert_cmpfloat_with_epsilon (lum->max, lum->min + 10000.0f, TEST_COLOR_EPSILON); g_assert_cmpfloat_with_epsilon (lum->ref, 303.0f, TEST_COLOR_EPSILON); emit_sync_event (1);