gpu: Use GskGpuShaderImage for colormatrix ops

This commit is contained in:
Benjamin Otte 2024-07-19 02:36:00 +02:00
parent 21988ea700
commit 0795d86df7
3 changed files with 12 additions and 12 deletions

View File

@ -52,10 +52,8 @@ gsk_gpu_color_matrix_op (GskGpuFrame *frame,
GskGpuShaderClip clip,
GskGpuColorStates color_states,
GskGpuDescriptors *desc,
guint32 descriptor,
const graphene_rect_t *rect,
const graphene_point_t *offset,
const graphene_rect_t *tex_rect,
const GskGpuShaderImage *image,
const graphene_matrix_t *color_matrix,
const graphene_vec4_t *color_offset)
{
@ -69,9 +67,9 @@ gsk_gpu_color_matrix_op (GskGpuFrame *frame,
desc,
&instance);
gsk_gpu_rect_to_float (rect, offset, instance->rect);
gsk_gpu_rect_to_float (tex_rect, offset, instance->tex_rect);
instance->tex_id = descriptor;
gsk_gpu_rect_to_float (image->coverage, offset, instance->rect);
gsk_gpu_rect_to_float (image->bounds, offset, instance->tex_rect);
instance->tex_id = image->descriptor;
graphene_matrix_to_float (color_matrix, instance->color_matrix);
graphene_vec4_to_float (color_offset, instance->color_offset);
}

View File

@ -10,10 +10,8 @@ void gsk_gpu_color_matrix_op (GskGpuF
GskGpuShaderClip clip,
GskGpuColorStates color_states,
GskGpuDescriptors *desc,
guint32 descriptor,
const graphene_rect_t *rect,
const graphene_point_t *offset,
const graphene_rect_t *tex_rect,
const GskGpuShaderImage *image,
const graphene_matrix_t *color_matrix,
const graphene_vec4_t *color_offset);

View File

@ -2988,10 +2988,14 @@ gsk_gpu_node_processor_add_color_matrix_node (GskGpuNodeProcessor *self,
gsk_gpu_clip_get_shader_clip (&self->clip, &self->offset, &node->bounds),
gsk_gpu_node_processor_color_states_explicit (self, self->ccs, FALSE),
self->desc,
descriptor,
&node->bounds,
&self->offset,
&tex_rect,
&(GskGpuShaderImage) {
image,
GSK_GPU_SAMPLER_DEFAULT,
descriptor,
&node->bounds,
&tex_rect,
},
color_matrix,
gsk_color_matrix_node_get_color_offset (node));