mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
gl renderer: Grow unblurred outset shadow outline on the gpu
This commit is contained in:
parent
0b999c73d1
commit
2977e91aed
@ -1391,8 +1391,6 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self,
|
||||
GskRoundedRect r = *gsk_outset_shadow_node_peek_outline (node);
|
||||
RenderOp *op;
|
||||
|
||||
gsk_rounded_rect_shrink (&r, -spread, -spread, -spread, -spread);
|
||||
|
||||
ops_set_program (builder, &self->unblurred_outset_shadow_program);
|
||||
op = ops_begin (builder, OP_CHANGE_UNBLURRED_OUTSET_SHADOW);
|
||||
rgba_to_float (gsk_outset_shadow_node_peek_color (node), op->unblurred_outset_shadow.color);
|
||||
|
@ -12,9 +12,10 @@ void main() {
|
||||
f.x += u_viewport.x;
|
||||
f.y = (u_viewport.y + u_viewport.w) - f.y;
|
||||
|
||||
RoundedRect outline = RoundedRect(vec4(u_outline.xy, u_outline.xy + u_outline.zw),
|
||||
RoundedRect inside = RoundedRect(vec4(u_outline.xy, u_outline.xy + u_outline.zw),
|
||||
u_corner_widths, u_corner_heights);
|
||||
RoundedRect inside = rounded_rect_shrink(outline, vec4(u_spread));
|
||||
|
||||
RoundedRect outline = rounded_rect_shrink(inside, vec4(- u_spread));
|
||||
|
||||
vec2 offset = vec2(u_offset.x, - u_offset.y);
|
||||
vec4 color = vec4(u_color.rgb * u_color.a, u_color.a);
|
||||
|
Loading…
Reference in New Issue
Block a user