gsk: Extend the blur radius for outset shadow extents
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 23 Nov 2022 17:58:18 +0000 (18:58 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 23 Nov 2022 18:27:49 +0000 (19:27 +0100)
commitb9448b06b4b28f03c42c2c3cc4cdb4a4f1016fec
treeceb84de9b65b8211341cf5e3ba5d74c6237c7bff
parent35744d87a2fda70b1f137d8cc124e45a67021518
gsk: Extend the blur radius for outset shadow extents

By dividing the blur radius to obtain the clip radius, we may end up
with halved values that result in an overshunk clip mask. Extend this
so that we ensure to cover the last pixel.

Fixes artifacts seen with the cairo renderer in X11 when resizing
windows horizontally, a black 1px high line would be seen in the
top of the window due to these outset bounds being used in clipping.

More mysteriously, also seems to fix resize lag in the GL renderer
(also X11), if e.g. the bottom-right corner of a window is resized
diagonally in bottom-left -> top-right direction, or
bottom-right -> top-left.

Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175#note_1599335
gsk/gskrendernodeimpl.c