[cairo] Device offset rework status, and what it needs from here

Vladimir Vukicevic vladimirv at gmail.com
Wed Apr 19 12:36:20 PDT 2006


On 3/13/06, Carl Worth <cworth at cworth.org> wrote:
> I think there are perhaps two functional changes here, and I think
> they are user-visible, semantic changes that need to be
> documented. But I'm not certain what they are. My two guesses are:
>
> A) This work changes the semantics of source surface patterns so that
>    their device-offsets are properly respected.
>
> B) This work allows things to work when a single cairo_t is used with
>    a target surface for which the device offset changes.
>
> But those are just examples. If I'm totally wrong about what this
> patch is doing, that doesn't really matter here. But I would like the
> history that is committed to reflect the real purpose by means of:
>
> 1) A commit that augments the test suite to demonstrate the current
>    problem.

This is pretty hard to do without the push-pop-group bits, I believe;
the group API is independent from the device offsets rework, except
that it produces incorrect results without the device offsets fix. 
The main problem was that the clip was being applied to the wrong
place -- clipping was ignoring any surface device offsets and was
treating its coordinates as always backend coords for clipping
purposes.  The problem is that that problem ended up remaining with
cworth's fixes (which I think make sense), so I ended up writing a
clip translation function.  However, I still think that keeping the
device offsets away from the CTM, as the patch does, is the right way
to go.

I can come up with a test case that demonstrates just the device
offset breakage.

The entire goal is to have the group API work, using reasonably-sized
(clip-sized, for now) platform-native temporary surfaces; if there's
another way to get to this point I'd be happy to use it.

    - Vlad


More information about the cairo mailing list