gpu: Make mask op obey ccs

No colorstate conversions allowed here, though technically we could use
the alternate color state for the source most of the time, as the mask's
colorstate is only relevant for luminance.
This commit is contained in:
Benjamin Otte 2024-07-06 03:50:07 +02:00
parent c407582096
commit 2fe9ff7918
2 changed files with 6 additions and 6 deletions

View File

@ -67,7 +67,7 @@ gsk_gpu_mask_op (GskGpuFrame *frame,
gsk_gpu_shader_op_alloc (frame,
&GSK_GPU_MASK_OP_CLASS,
DEFAULT_COLOR_STATES,
gsk_gpu_color_states_create_equal (TRUE, TRUE),
mask_mode,
clip,
desc,

View File

@ -50,10 +50,10 @@ void
run (out vec4 color,
out vec2 position)
{
vec4 source = gsk_texture (_source_id, _source_coord) *
rect_coverage (_source_rect, _pos);
vec4 mask = gsk_texture (_mask_id, _mask_coord) *
rect_coverage (_mask_rect, _pos);
vec4 source = gsk_texture (_source_id, _source_coord);
source = output_color_alpha (source, rect_coverage (_source_rect, _pos));
vec4 mask = gsk_texture (_mask_id, _mask_coord);
mask = output_color_alpha (mask, rect_coverage (_mask_rect, _pos));
float alpha = _opacity;
switch (VARIATION_MASK_MODE)
@ -78,7 +78,7 @@ run (out vec4 color,
break;
}
color = source * alpha;
color = output_color_alpha (source, alpha);
position = _pos;
}