From d8059ebdd28c692743f1cef631304ecedd7a27cf Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 11 Jul 2024 08:05:31 +0200 Subject: [PATCH] gpu: "Implement" GL shader nodes Instead of falling back to Cairo, draw the pink error rectangle directly. --- gsk/gpu/gskgpunodeprocessor.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 3d4f66f404..08f1a6657a 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c @@ -2289,6 +2289,19 @@ gsk_gpu_node_processor_add_shadow_node (GskGpuNodeProcessor *self, g_object_unref (image); } +static void +gsk_gpu_node_processor_add_gl_shader_node (GskGpuNodeProcessor *self, + GskRenderNode *node) +{ + GdkRGBA pink = { 255 / 255., 105 / 255., 180 / 255., 1.0 }; + + gsk_gpu_color_op (self->frame, + gsk_gpu_clip_get_shader_clip (&self->clip, &self->offset, &node->bounds), + &node->bounds, + &self->offset, + &GDK_RGBA_INIT_ALPHA (&pink, self->opacity)); +} + static void gsk_gpu_node_processor_add_blend_node (GskGpuNodeProcessor *self, GskRenderNode *node) @@ -3397,8 +3410,8 @@ static const struct }, [GSK_GL_SHADER_NODE] = { 0, - 0, - NULL, + GSK_GPU_HANDLE_OPACITY, + gsk_gpu_node_processor_add_gl_shader_node, NULL, NULL, },