[gtk/shadow-reduction] gsk: Don't overshadow
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shadow-reduction] gsk: Don't overshadow
- Date: Thu, 8 Apr 2021 13:37:45 +0000 (UTC)
commit 7e1233d64caf3641df97427af1ff920aaecaf370
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 8 09:36:51 2021 -0400
gsk: Don't overshadow
Reduce the cairo shadows to the same size as their GL brethren.
gsk/gskrendernodeimpl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 640c792268..799df45553 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -1922,7 +1922,7 @@ gsk_inset_shadow_node_draw (GskRenderNode *node,
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_corner (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ draw_shadow_corner (cr, TRUE, &box, &clip_box, self->blur_radius/2.0, &self->color, i, &r);
cairo_restore (cr);
/* We drew the region, remove it from remaining */
@@ -1936,7 +1936,7 @@ gsk_inset_shadow_node_draw (GskRenderNode *node,
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_side (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ draw_shadow_side (cr, TRUE, &box, &clip_box, self->blur_radius/2.0, &self->color, i, &r);
cairo_restore (cr);
/* We drew the region, remove it from remaining */
@@ -1948,7 +1948,7 @@ gsk_inset_shadow_node_draw (GskRenderNode *node,
cairo_save (cr);
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, GSK_BLUR_NONE);
+ draw_shadow (cr, TRUE, &box, &clip_box, self->blur_radius/2.0, &self->color, GSK_BLUR_NONE);
cairo_restore (cr);
cairo_region_destroy (remaining);
@@ -2217,7 +2217,7 @@ gsk_outset_shadow_node_draw (GskRenderNode *node,
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_corner (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ draw_shadow_corner (cr, FALSE, &box, &clip_box, self->blur_radius/2.0, &self->color, i, &r);
cairo_restore (cr);
/* We drew the region, remove it from remaining */
@@ -2231,7 +2231,7 @@ gsk_outset_shadow_node_draw (GskRenderNode *node,
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_side (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ draw_shadow_side (cr, FALSE, &box, &clip_box, self->blur_radius/2.0, &self->color, i, &r);
cairo_restore (cr);
/* We drew the region, remove it from remaining */
@@ -2243,7 +2243,7 @@ gsk_outset_shadow_node_draw (GskRenderNode *node,
cairo_save (cr);
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, GSK_BLUR_NONE);
+ draw_shadow (cr, FALSE, &box, &clip_box, self->blur_radius/2.0, &self->color, GSK_BLUR_NONE);
cairo_restore (cr);
cairo_region_destroy (remaining);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]