Created attachment 57269 [details]
Test case using just pixman
Attached are two tests programs. The cairo one should produce a file "out.png" completely filled with blue, but instead the PNG is transparent.
The pixman test does (more or less) the same calls to pixman as cairo does when executing the above test. This should output "ff0000ff", but instead just says "0".
The pixman test has an "#if 0" at the beginning. When that is replaced with "#if 1", the correct result is generated.
The cairo test has the equivalent of this "#if" in lines 21/22. Depending on which of the two lines is uncommented, the test works or doesn't work.
Created attachment 57270 [details]
Test case using cairo
This is almost certainly because the transformation implies that coordinates outside of the 16.16 coordinate space are used. If so, it's a long-standing and hard-to-fix issue that probably involves using floating point for transformations.
In my opinion the issue is indeed hard to fix, but not impossible. This can be probably handled by generalizing fixed point support in the code (allow representations other than 16.16) and making sure that as many problems as possible are detected by the test suite. Using some toy 8.8 fixed point representation as a default can be used to check how the corner cases are handled and experiment with automatic promotion to something bigger (16.16 or more).
Floating point coordinates are also an option. They are harder to test due to non-bitexact results. But if the code is first adapted to support multiple fixed point representations, then just dropping in another representation (floating point one) should be much less painful.
Now this particular problem should be easier to fix after the introduction of http://cgit.freedesktop.org/pixman/commit/?id=c3deb8334a71998b986a7b8d5b74bedf26cc23aa
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pixman/pixman/issues/1.