gpu: Make blur op obey ccs
Blend ops don't do colorspace conversion, so this commit just hardcodes that and rewrites the shader to use recent APIs.
This commit is contained in:
@@ -68,7 +68,7 @@ gsk_gpu_blend_mode_op (GskGpuFrame *frame,
|
||||
|
||||
gsk_gpu_shader_op_alloc (frame,
|
||||
&GSK_GPU_BLEND_MODE_OP_CLASS,
|
||||
DEFAULT_COLOR_STATES,
|
||||
gsk_gpu_color_states_create_equal (TRUE, TRUE),
|
||||
blend_mode,
|
||||
clip,
|
||||
desc,
|
||||
|
||||
@@ -51,11 +51,15 @@ void
|
||||
run (out vec4 color,
|
||||
out vec2 position)
|
||||
{
|
||||
color = _opacity * blend_mode (gsk_texture (_bottom_id, _bottom_coord)
|
||||
* rect_coverage (_bottom_rect, _pos),
|
||||
gsk_texture (_top_id, _top_coord)
|
||||
* rect_coverage (_top_rect, _pos),
|
||||
GSK_VARIATION);
|
||||
vec4 bottom_color = gsk_texture (_bottom_id, _bottom_coord);
|
||||
bottom_color = output_color_alpha (bottom_color, rect_coverage (_bottom_rect, _pos));
|
||||
|
||||
vec4 top_color = gsk_texture (_top_id, _top_coord);
|
||||
top_color = output_color_alpha (top_color, rect_coverage (_top_rect, _pos));
|
||||
|
||||
color = blend_mode (bottom_color, top_color, GSK_VARIATION);
|
||||
color = output_color_alpha (color, _opacity);
|
||||
|
||||
position = _pos;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user