gpu: "Implement" GL shader nodes

Instead of falling back to Cairo, draw the pink error rectangle
directly.
This commit is contained in:
Benjamin Otte 2024-07-11 08:05:31 +02:00
parent 1001445d3e
commit d8059ebdd2

View File

@ -2289,6 +2289,19 @@ gsk_gpu_node_processor_add_shadow_node (GskGpuNodeProcessor *self,
g_object_unref (image); 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 static void
gsk_gpu_node_processor_add_blend_node (GskGpuNodeProcessor *self, gsk_gpu_node_processor_add_blend_node (GskGpuNodeProcessor *self,
GskRenderNode *node) GskRenderNode *node)
@ -3397,8 +3410,8 @@ static const struct
}, },
[GSK_GL_SHADER_NODE] = { [GSK_GL_SHADER_NODE] = {
0, 0,
0, GSK_GPU_HANDLE_OPACITY,
NULL, gsk_gpu_node_processor_add_gl_shader_node,
NULL, NULL,
NULL, NULL,
}, },