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.
This commit is contained in:
Benjamin Otte 2024-08-14 08:07:21 +02:00
parent 8c6e5ca131
commit 824ccfc562

View File

@ -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) |