diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-16 13:26:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-29 08:08:38 +0100 |
commit | d8dbce021a4493330864154e67ca6e4a1f2f50b2 (patch) | |
tree | 06e1c93d3d96f892e1b646ff41098f79a37103c1 /src/cairo-script-surface.c | |
parent | eba6b5126a55c84706e677b3fc88743f64cc28d7 (diff) | |
download | cairo-d8dbce021a4493330864154e67ca6e4a1f2f50b2.tar.gz |
[script] recursive active (type3 glyphs)
The assumption that an active surface could not recurse into another
operation was invalid - due to the complexity of handling type3 glyphs.
Diffstat (limited to 'src/cairo-script-surface.c')
-rw-r--r-- | src/cairo-script-surface.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c index 6b6d8ffff..15d1ab055 100644 --- a/src/cairo-script-surface.c +++ b/src/cairo-script-surface.c @@ -1934,9 +1934,8 @@ _cairo_script_surface_clipper_intersect_clip_path (cairo_surface_clipper_t *clip static void active (cairo_script_surface_t *surface) { - assert (surface->active == FALSE); - surface->active = TRUE; - surface->ctx->active++; + if (surface->active++ == 0) + surface->ctx->active++; } static void @@ -1945,10 +1944,10 @@ inactive (cairo_script_surface_t *surface) cairo_script_context_t *ctx = surface->ctx; cairo_list_t sorted; - assert (surface->active == TRUE); - surface->active = FALSE; + if (--surface->active) + return; - if (--ctx->active > 0) + if (--ctx->active) return; cairo_list_init (&sorted); |