rendernodes: Whitespace

This commit is contained in:
Timm Bäder 2020-08-29 12:03:20 +02:00
parent b0d89b1882
commit 51b398b960

View File

@ -804,13 +804,13 @@ has_empty_clip (cairo_t *cr)
} }
static void static void
draw_shadow (cairo_t *cr, draw_shadow (cairo_t *cr,
gboolean inset, gboolean inset,
const GskRoundedRect*box, const GskRoundedRect *box,
const GskRoundedRect*clip_box, const GskRoundedRect *clip_box,
float radius, float radius,
const GdkRGBA *color, const GdkRGBA *color,
GskBlurFlags blur_flags) GskBlurFlags blur_flags)
{ {
cairo_t *shadow_cr; cairo_t *shadow_cr;
@ -1129,31 +1129,31 @@ gsk_inset_shadow_node_draw (GskRenderNode *node,
/* First do the corners of box */ /* First do the corners of box */
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
cairo_save (cr); cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */ /* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining); gdk_cairo_region (cr, remaining);
cairo_clip (cr); 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, &self->color, i, &r);
cairo_restore (cr); cairo_restore (cr);
/* We drew the region, remove it from remaining */ /* We drew the region, remove it from remaining */
cairo_region_subtract_rectangle (remaining, &r); cairo_region_subtract_rectangle (remaining, &r);
} }
/* Then the sides */ /* Then the sides */
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
cairo_save (cr); cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */ /* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining); gdk_cairo_region (cr, remaining);
cairo_clip (cr); 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, &self->color, i, &r);
cairo_restore (cr); cairo_restore (cr);
/* We drew the region, remove it from remaining */ /* We drew the region, remove it from remaining */
cairo_region_subtract_rectangle (remaining, &r); cairo_region_subtract_rectangle (remaining, &r);
} }
/* Then the rest, which needs no blurring */ /* Then the rest, which needs no blurring */
@ -1431,31 +1431,31 @@ gsk_outset_shadow_node_draw (GskRenderNode *node,
/* First do the corners of box */ /* First do the corners of box */
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
cairo_save (cr); cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */ /* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining); gdk_cairo_region (cr, remaining);
cairo_clip (cr); 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, &self->color, i, &r);
cairo_restore (cr); cairo_restore (cr);
/* We drew the region, remove it from remaining */ /* We drew the region, remove it from remaining */
cairo_region_subtract_rectangle (remaining, &r); cairo_region_subtract_rectangle (remaining, &r);
} }
/* Then the sides */ /* Then the sides */
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
cairo_save (cr); cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */ /* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining); gdk_cairo_region (cr, remaining);
cairo_clip (cr); 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, &self->color, i, &r);
cairo_restore (cr); cairo_restore (cr);
/* We drew the region, remove it from remaining */ /* We drew the region, remove it from remaining */
cairo_region_subtract_rectangle (remaining, &r); cairo_region_subtract_rectangle (remaining, &r);
} }
/* Then the rest, which needs no blurring */ /* Then the rest, which needs no blurring */