summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-08-23 08:26:38 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2013-08-23 08:26:38 (GMT)
commit294c0413ad612c4353b99235619ddb5f74b02692 (patch)
treee34d860b202231a51bfc9c25b16295bc0f3972f6
parent15f6e2250a9c70e622ff2973a7b359b9e9c4619c (diff)
downloadlibsvgtiny-294c0413ad612c4353b99235619ddb5f74b02692.tar.gz
libsvgtiny-294c0413ad612c4353b99235619ddb5f74b02692.tar.bz2
Move gradient logging to svgtiny_gradient.c, and suppress when not debugging gradients.
-rw-r--r--src/svgtiny.c2
-rw-r--r--src/svgtiny_gradient.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/svgtiny.c b/src/svgtiny.c
index 13249b6..5be977f 100644
--- a/src/svgtiny.c
+++ b/src/svgtiny.c
@@ -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)
diff --git a/src/svgtiny_gradient.c b/src/svgtiny_gradient.c
index 5361532..8103c14 100644
--- a/src/svgtiny_gradient.c
+++ b/src/svgtiny_gradient.c
@@ -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
}