gpu: The colorstate op doesn't need a colorstates arg

It's using the same colorstate all the time: any premultiplied.

So just hardcode it.
This commit is contained in:
Benjamin Otte 2024-08-20 00:32:10 +02:00
parent f650f96b69
commit f6a8ba0ccb
3 changed files with 1 additions and 13 deletions

View File

@ -53,7 +53,6 @@ static const GskGpuShaderOpClass GSK_GPU_CROSS_FADE_OP_CLASS = {
void
gsk_gpu_cross_fade_op (GskGpuFrame *frame,
GskGpuShaderClip clip,
GskGpuColorStates color_states,
const graphene_rect_t *rect,
const graphene_point_t *offset,
float opacity,
@ -65,7 +64,7 @@ gsk_gpu_cross_fade_op (GskGpuFrame *frame,
gsk_gpu_shader_op_alloc (frame,
&GSK_GPU_CROSS_FADE_OP_CLASS,
color_states,
gsk_gpu_color_states_create_equal (TRUE, TRUE),
0,
clip,
(GskGpuImage *[2]) { start->image, end->image },

View File

@ -8,7 +8,6 @@ G_BEGIN_DECLS
void gsk_gpu_cross_fade_op (GskGpuFrame *frame,
GskGpuShaderClip clip,
GskGpuColorStates color_states,
const graphene_rect_t *rect,
const graphene_point_t *offset,
float opacity,

View File

@ -265,15 +265,6 @@ gsk_gpu_node_processor_color_states_explicit (GskGpuNodeProcessor *self,
alt_premultiplied);
}
static inline GskGpuColorStates
gsk_gpu_node_processor_color_states_for_rgba (GskGpuNodeProcessor *self)
{
return gsk_gpu_color_states_create (self->ccs,
TRUE,
GDK_COLOR_STATE_SRGB,
FALSE);
}
static void
rect_round_to_pixels (const graphene_rect_t *src,
const graphene_vec2_t *pixel_scale,
@ -2845,7 +2836,6 @@ gsk_gpu_node_processor_add_cross_fade_node (GskGpuNodeProcessor *self,
gsk_gpu_cross_fade_op (self->frame,
gsk_gpu_clip_get_shader_clip (&self->clip, &self->offset, &node->bounds),
gsk_gpu_node_processor_color_states_for_rgba (self),
&node->bounds,
&self->offset,
self->opacity,