[cairo] Quartz regression in release 1.12

cu cairouser at yahoo.com
Mon Apr 23 10:28:37 PDT 2012


Well, more digging. There seems to be a sort of a loop (probably intentional,
though I don't quite understand it), with stack trace as follows (bottom to top):
_cairo_image_surface_map_to_image
_cairo_surface_map_to_image
_cairo_surface_to_cgimage
_cairo_quartz_setup_state
_cairo_image_surface_map_to_image

It seems that at some point an image surface is created for source pattern.
Due to this code in _cairo_image_surface_map_to_image:
surface =
        _cairo_image_surface_create_with_pixman_format (data,
                                                        other->pixman_format,
                                                        extents->width,
                                                        extents->height,
                                                        other->stride);

the resulting surface is created using width supplied by extents,
and stride taken from "other" surface. The "other" surface appears
to be a source pattern surface, that is of smaller size than a
target surface into which it is being drawn. Extents, however, are
of the same size as larger target surface (even though presumably
they should be based on source pattern surface size).

So, we end up with surface created with large width and small stride.

Seems like a double issue to me.
1. Extents are not properly defined for given surface size (that part seems to
be in quartz surface module)

2.cairo_image_surface_map_to_image function doesn't do any checking and
creates image surface with invalid stride (I would guess it has to either fail
completely, or adjust stride but not simply pass invalid value)


> Ok, I'm quite confident that this means that you're not on the
> wip/map-quartz branch.
> Please check if 'git branch' returns a list of branches with
> 'wip/map-quartz' starred.
> If not, please do 'git checkout wip/quartz-map', rebuild and test again.
> (Fixing this issue with the mapping is exactly the purpose of the
> wip/map-quartz branch).
> Another way to check if you're on the right branch is to check if the
> current state is 'git log'. It should show a list of commits and the
> first one should be 6021ff13f5e7d8ab0b9692cf36ee055c45530134.
>
> Andrea
>
>   


More information about the cairo mailing list