[cairo-bugs] [Bug 41409] Assertion when marking as dirty a surface on which no Cairo operations have been made

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 8 04:30:41 PDT 2011


--- Comment #3 from Uli Schlachter <psychon at znc.in> 2011-10-08 04:30:37 PDT ---
"I don't know if it makes
sense to flush a snapshot, but we allowed that previously. Should this change?"
I just noticed that this comment is wrong. When a surface is
finished/destroyed, cairo_surface_finish() calls cairo_surface_flush(), thus
this change can't work.

That leaves us with:

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 3be6d42..0810f18 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1314,6 +1314,7 @@ cairo_surface_flush (cairo_surface_t *surface)

     /* update the current snapshots *before* the user updates the surface */
     _cairo_surface_detach_snapshots (surface);
+    _cairo_surface_detach_mime_data (surface);

     if (surface->backend->flush) {
        status = surface->backend->flush (surface);

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the cairo-bugs mailing list