gpu: don't store transformed rectangle paths under the same cache key

Fixes incorrect rendering of multiple transformed instances of a
rectangle.

Fixes: https://todo.sr.ht/~eliasnaur/gio/635
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2025-02-18 14:51:26 +00:00
parent 4f720af6f2
commit 77709d1771
3 changed files with 19 additions and 1 deletions
+2 -1
View File
@@ -1055,6 +1055,7 @@ loop:
} else {
quads.aux, bounds, _ = d.boundsForTransformedRect(bounds, trans)
quads.key = opKey{Key: encOp.Key}
quads.key = quads.key.SetTransform(trans)
}
d.addClipPath(&state, quads.aux, quads.key, bounds, off)
quads = quadsOp{}
@@ -1100,7 +1101,7 @@ loop:
// The paint operation is sheared or rotated, add a clip path representing
// this transformed rectangle.
k := opKey{Key: encOp.Key}
k.SetTransform(t) // TODO: This call has no effect.
k = k.SetTransform(t)
d.addClipPath(&state, clipData, k, bnd, off)
}