gtk/testsuite/gsk/compare/offscreen-forced-downscale-all-clipped.node
Benjamin Otte 23af1cd8ad gpu: When transforming to simpler transform, we might be all clipped
When transforming back from a complex transform to a simpler transform,
the resulting clip might turn out to clip everything, because clips can
grow while transforming, but the scissor rect won't. So when this
process happens, we can end up with an empty clip by transforming:

1. Set a clip that also sets the scissor
2. transform in a way that grows the clip, say rotate(45)
3. modify the clip to shrink it
4. transform in a way that simplifies the transform, say another
   rotate(45)
5. Figure out that this clip and the scissor rect do no longer overlap

Catch this case and avoid drawing anything.
2024-08-10 02:38:13 +02:00

23 lines
419 B
Plaintext

clip {
clip: 1 -9 26 116;
child: container {
color {
bounds: -10 -10 20 120;
color: rgb(255,255,255);
}
transform {
transform: rotate(45);
child: transform {
transform: rotate(45);
child: shadow {
shadows: rgb(0,0,0) 0 1;
child: color {
bounds: 0 0 100 1;
color: rgb(255,0,0);
}
}
}
}
}
}