From 824ccfc562d2a9fc9d58327560a1b583280d0eab Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 14 Aug 2024 08:07:21 +0200 Subject: [PATCH] gpu: Add an assertion If the wrong color states get passed, we need to figure that out, before we run shaders with junk values doing god knows what. --- gsk/gpu/gskgpucolorstatesprivate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gsk/gpu/gskgpucolorstatesprivate.h b/gsk/gpu/gskgpucolorstatesprivate.h index 07ccdb8775..c761bfe84e 100644 --- a/gsk/gpu/gskgpucolorstatesprivate.h +++ b/gsk/gpu/gskgpucolorstatesprivate.h @@ -44,6 +44,8 @@ gsk_gpu_color_states_create_cicp (GdkColorState *output_color_state, gboolean output_is_premultiplied, gboolean cicp_is_premultiplied) { + g_assert (GDK_IS_DEFAULT_COLOR_STATE (output_color_state)); + return (GDK_DEFAULT_COLOR_STATE_ID (output_color_state) << COLOR_SPACE_OUTPUT_SHIFT) | (output_is_premultiplied ? COLOR_SPACE_OUTPUT_PREMULTIPLIED : 0) | (GDK_DEFAULT_COLOR_STATE_ID (output_color_state) << COLOR_SPACE_ALT_SHIFT) |