]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
Move gradient logging to svgtiny_gradient.c, and suppress when not debugging gradients.
authorMichael Drake <tlsa@netsurf-browser.org>
Fri, 23 Aug 2013 08:26:38 +0000 (09:26 +0100)
committerMichael Drake <tlsa@netsurf-browser.org>
Fri, 23 Aug 2013 08:26:38 +0000 (09:26 +0100)
src/svgtiny.c
src/svgtiny_gradient.c

index 13249b62cdeb45068dfe7deb5b6ba8572ad2c1c2..5be977f4c234739f69aa2bf9883d7d41343903c0 100644 (file)
@@ -1392,8 +1392,6 @@ static void _svgtiny_parse_color(const char *s, svgtiny_colour *c,
                                *rparen = 0;
                        svgtiny_find_gradient(id, state);
                        free(id);
-                       fprintf(stderr, "linear_gradient_stop_count %i\n",
-                                       state->linear_gradient_stop_count);
                        if (state->linear_gradient_stop_count == 0)
                                *c = svgtiny_TRANSPARENT;
                        else if (state->linear_gradient_stop_count == 1)
index 5361532e593b12f07ab461b8690cdb4d6eeb00b2..8103c14454a5dabfab6bd3cc1c434ca9f3ad0f14 100644 (file)
@@ -88,6 +88,11 @@ void svgtiny_find_gradient(const char *id, struct svgtiny_parse_state *state)
        
        dom_string_unref(id_str);
        dom_node_unref(gradient);
+
+       #ifdef GRADIENT_DEBUG
+       fprintf(stderr, "linear_gradient_stop_count %i\n",
+                       state->linear_gradient_stop_count);
+       #endif
 }