[cairo] [PATCH 1/5] surface: Improvements to map/unmap

Andrea Canciani ranma42 at gmail.com
Thu May 17 13:28:05 PDT 2012


The map public API is more useful if it guarantees that the image it
returns has a valid format. Conversely the private API probably wants
to avoid any kind of conversion as any pixel manipulation is performed
by pixman.

In addition to this, the backend functions for map and unmap can be
improved by:

1. making map/unmap symmetric (i.e. if map counts as +1 on the
   refcount, unmap counts as -1).

2. ensuring that map returns a cairo_image_surface_t * (this is not
   the case for quartz and some other backends, but no warning is
   issued because they are returning cairo_surface_t *).

This patchset should implement these improvements. Unfortunately this
also means that it affects many files in multiple different backends.

Please review and test (and hope with me that things did not break
while rebasing).

Andrea




More information about the cairo mailing list