[cairo-bugs] [Bug 56981] regression in cairo_surface_t refcounting when using cairo_surface_unmap_image

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Nov 15 13:33:07 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=56981

--- Comment #2 from Uli Schlachter <psychon at znc.in> ---
Oh, that was easy. cairo_surface_unmap_image() finishes the image surface. This
does the following in _cairo_image_surface_finish():

    cairo_surface_destroy (surface->parent);

However, that extra reference was never taken. Possible fixes are:

- Add a call to cairo_surface_reference() in _cairo_image_surface_set_parent()
[This might possibly fix a similar bug in cairo-win32, however, no clue how
that parent-magic in cairo-win32 works exactly]
- Add that call in _cairo_image_surface_clone_subimage()
- Revert the faulty commit and go back to set_user_data()

I'll let Chris decide about this since he might know how this is supposed to
work while I don't (and cairo-win32 is too much black magic for my taste).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20121115/ec7d3095/attachment.html>


More information about the cairo-bugs mailing list