From a419d00fbecf18736f5566e1c4e3786cc7b4586c Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 8 Oct 2011 13:40:11 +0200 Subject: [PATCH] flush: Detach mime data Drawing directly to a surface has to be surrounded with cairo_surface_flush() and cairo_surface_mark_dirty(). However, if the surface has mime data associated, this would hit the following assert: lt-cairo-test-suite: cairo-surface.c:1381: cairo_surface_mark_dirty_rectangle: Assertion `! _cairo_surface_has_mime_data (surface)' failed. This is now fixed by detaching all mime data in cairo_surface_flush(). Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41409 Fixes: create-from-png, create-from-png-stream Signed-off-by: Uli Schlachter --- src/cairo-surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cairo-surface.c b/src/cairo-surface.c index 3be6d420c..0810f181c 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);