[cairo] Bug with fallback resolution of groups

Carl Worth cworth at cworth.org
Wed May 21 10:50:32 PDT 2008


On Wed, 21 May 2008 10:29:09 -0700, Carl Worth wrote:
> I've just pushed a change to the fallback-resolution test making it
> expose a bug with the way that groups are handled.
>
> With this change, the top half of each page is drawn as always, while
> the bottom half is drawn with identical code, but inside a group.

What's happening is that the meta-surface is recorded with a device
resolution of 72 user-space units per device unit.

Then, to support the fallback resolution, an image surface is
constructed, and a device-scale is set on that mapping the
meta-surface 72ppi to the desired fallback resolution, (for example,
600ppi). So, in this case that would be a device_scale of 8.33.

These manipulations can be found in
cairo-paginated-surface.c:_paint_fallback_image.

Then, the meta surface (recorded at 72ppi) is replied to this image
surface with an 8.33 device-scale and we get the desired output. So
that much is good.

The problem comes with the group, where we end up calling
_cairo_meta_surface_acquire_source_image. This function creates its
own image surface and replays a meta-surface to it. However, this time
there is no device-scale being set on the image surface.

So we just need to get a single scale factor set somewhere. The trick
is finding out exactly where to set it. Getting it from the
destination surface to the intermediate surface in
_acquire_source_image looks hard. Maybe we can do something at the
time of the creation of the meta-surface for the group.

I'll keep looking, but any help from anybody would be greatly
appreciated.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080521/4a030ff1/attachment.pgp 


More information about the cairo mailing list