diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-07-09 01:35:11 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-07-10 02:57:09 -0400 |
commit | 0fce356762864572ae126733f657600fbb9116ce (patch) | |
tree | a442f33e6f2f5b9574496f9b091d69e2ec1e9212 /test | |
parent | 61254a3c09497214a9c7ca89e275286533a3be2e (diff) |
Add workarounds for X servers doing out-of-bounds accesses.
Old X servers rely on out-of-bounds accesses when they are asked
to composite with a window as the source. They create a pixman image
pointing to some bogus position in memory, but then they set a clip
region to the position where the actual bits are.
Due to a bug in old versions of pixman, where it would not clip
against the image bounds when a clip region was set, this would
actually work.
The workaround added by this commit is to try and detect whether a
source drawable is actually a window without a client clip set. Such a
window will generally have a clip region that corresponds exactly to
the hierarchy clip in the server, whereas pixmaps will have a clip
region that is an exact match to the drawable.
When we detect such a window, we allow a fast path to run that would
normally be rejected due to the sources not completely subsuming the
composite region.
Fixed X servers should call the new function
pixman_disable_out_of_bounds_workaround() to disable the workaround.
This was reported in bug 22484.
Diffstat (limited to 'test')
-rw-r--r-- | test/scaling-test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/scaling-test.c b/test/scaling-test.c index 1919d5f..c56fac7 100644 --- a/test/scaling-test.c +++ b/test/scaling-test.c @@ -310,6 +310,8 @@ int main(int argc, char *argv[]) int i, n = 0; uint32_t crc = 0; + pixman_disable_out_of_bounds_workaround(); + if (argc >= 2) n = atoi(argv[1]); |