From 1952fec8294b6473cb1c0719d1ef0fb0b864b6b6 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 8 Mar 2012 15:11:40 +0000 Subject: [PATCH] surface: Relax assertion about not rendering to a snapshot Recently I began using the surface->snapshot_of member of a subsurface to cache a target representation of the current subsurface. More recently, I discovered this caused an assertion failure in epiphany, and probably other GTK3 based programs. Throwaway the assertion and trust that the programmer doesn't make any mistakes... Signed-off-by: Chris Wilson --- src/cairo-surface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cairo-surface.c b/src/cairo-surface.c index d8f5b91ef..237a17ca9 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -387,9 +387,11 @@ _cairo_surface_begin_modification (cairo_surface_t *surface) { assert (surface->status == CAIRO_STATUS_SUCCESS); assert (! surface->finished); - assert (surface->snapshot_of == NULL); _cairo_surface_detach_snapshots (surface); + if (surface->snapshot_of != NULL) + _cairo_surface_detach_snapshot (surface); + _cairo_surface_detach_mime_data (surface); }