[librsvg/wip/otte: 16/39] base: Remove old cycle detection code



commit 92d8641351abb37f353c1e9bf80ef4c957772279
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 7 12:54:51 2015 +0200

    base: Remove old cycle detection code
    
    The old code kept track of which nodes had already been drawn. Which
    worked for all nodes that actually were drawn, but not for nodes that
    were used as masks, paint server fallbacks or similar.
    
    But now that we have generic code that does work everywhere, this old
    code is no longer needed.

 rsvg-base.c         |    1 -
 rsvg-cairo-render.c |    1 -
 rsvg-private.h      |    1 -
 rsvg-structure.c    |   17 -----------------
 4 files changed, 0 insertions(+), 20 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 953e962..d4fc47e 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1234,7 +1234,6 @@ rsvg_drawing_ctx_free (RsvgDrawingCtx * handle)
        /* the drawsub stack's nodes are owned by the ->defs */
        g_slist_free (handle->drawsub_stack);
 
-    g_slist_free (handle->ptrs);
     g_warn_if_fail (handle->acquired_nodes == NULL);
     g_slist_free (handle->acquired_nodes);
        
diff --git a/rsvg-cairo-render.c b/rsvg-cairo-render.c
index 0dd1162..ff0b070 100644
--- a/rsvg-cairo-render.c
+++ b/rsvg-cairo-render.c
@@ -154,7 +154,6 @@ rsvg_cairo_new_drawing_ctx (cairo_t * cr, RsvgHandle * handle)
     draw->vb.rect.height = data.ex;
     draw->pango_context = NULL;
     draw->drawsub_stack = NULL;
-    draw->ptrs = NULL;
     draw->acquired_nodes = NULL;
 
     rsvg_state_push (draw);
diff --git a/rsvg-private.h b/rsvg-private.h
index fd1c1c4..b276151 100644
--- a/rsvg-private.h
+++ b/rsvg-private.h
@@ -199,7 +199,6 @@ struct RsvgDrawingCtx {
     RsvgViewBox vb;
     GSList *vb_stack;
     GSList *drawsub_stack;
-    GSList *ptrs;
     GSList *acquired_nodes;
 };
 
diff --git a/rsvg-structure.c b/rsvg-structure.c
index b86cded..4ab4473 100644
--- a/rsvg-structure.c
+++ b/rsvg-structure.c
@@ -51,25 +51,8 @@ rsvg_node_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate)
     if (!state->visible)
         return;
 
-    if (g_slist_find(ctx->ptrs, self) != NULL)
-    {
-        /*
-         * 5.3.1 of the SVG 1.1 spec (http://www.w3.org/TR/SVG11/struct.html#HeadOverview)
-         * seems to indicate ("URI references that directly or indirectly reference
-         * themselves are treated as invalid circular references") that circular
-         * references are invalid, and so we can drop them to avoid infinite recursion.
-         * 
-         * See also http://bugzilla.gnome.org/show_bug.cgi?id=518640
-         */
-        g_warning("Circular SVG reference noticed, dropping");
-        return;
-    }
-    ctx->ptrs = g_slist_append(ctx->ptrs, self);
-
     self->draw (self, ctx, dominate);
     ctx->drawsub_stack = stacksave;
-
-    ctx->ptrs = g_slist_remove(ctx->ptrs, self);
 }
 
 /* generic function for drawing all of the children of a particular node */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]