gsk: Fix clipping error when drawing shadows
authorBenjamin Otte <otte@redhat.com>
Mon, 18 Sep 2023 05:48:10 +0000 (07:48 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 19 Sep 2023 20:32:27 +0000 (16:32 -0400)
commit152c09ee86a97fd141d51f617b492922522df1dd
tree03046311fe64cca35554e80e539be8a7090564a3
parent521f8a11d8d2e0686301d93fcab9821b1eea9608
gsk: Fix clipping error when drawing shadows

When shadows were offset - in particular when offset so the original
source was out of bounds of the result - the drawing code would create a
pattern for it that didn't include enough of it to compose a shadow.

Fix that by not creating those patterns anymore, but instead drawing the
source (potentially multiple times) at the required offsets.

While that does more drawing, it simplifies the shadow node draw code,
and that's the primary goal of the Cairo rendering.

Test included.
gsk/gskrendernodeimpl.c
testsuite/gsk/compare/shadow-clip-contents.node [new file with mode: 0644]
testsuite/gsk/compare/shadow-clip-contents.png [new file with mode: 0644]
testsuite/gsk/meson.build