Bug 626994. Fix the depth counting. r=ehsan a=joe

Previously we missed a decrement at the end of the recursion.
This caused us to accumulate over time, causing us to misreport.

--HG--
extra : rebase_source : 4129933528b3c40aaefad7f8f8a4c5a76f35a9b1
This commit is contained in:
Jeff Muizelaar 2011-02-02 13:47:12 -05:00
parent bf00e23933
commit 5ed1ac7d88

View File

@ -200,14 +200,18 @@ _cairo_spline_decompose_into (cairo_spline_knots_t *s1, double tolerance_squared
}
#endif
if (_cairo_spline_error_squared (s1) < tolerance_squared)
if (_cairo_spline_error_squared (s1) < tolerance_squared) {
depth--;
return _cairo_spline_add_point (result, &s1->a);
}
_de_casteljau (s1, &s2);
status = _cairo_spline_decompose_into (s1, tolerance_squared, result);
if (unlikely (status))
if (unlikely (status)) {
depth--;
return status;
}
status = _cairo_spline_decompose_into (&s2, tolerance_squared, result);
depth--;