Index: src/core/SkStrokeRec.cpp |
diff --git a/src/core/SkStrokeRec.cpp b/src/core/SkStrokeRec.cpp |
index c25a652a88e8fe4dc1aa4f3c9f7521419e583bc4..2ca7efd7033198c5c8cf3051e4d6cdc3bb25fba8 100644 |
--- a/src/core/SkStrokeRec.cpp |
+++ b/src/core/SkStrokeRec.cpp |
@@ -100,6 +100,12 @@ void SkStrokeRec::setStrokeStyle(SkScalar width, bool strokeAndFill) { |
#include "SkStroke.h" |
+#if defined SK_QUAD_STROKE_APPROXIMATION && defined SK_DEBUG |
+ // enables tweaking these values at runtime from SampleApp |
+ bool gDebugStrokerErrorSet = false; |
+ SkScalar gDebugStrokerError; |
+#endif |
+ |
bool SkStrokeRec::applyToPath(SkPath* dst, const SkPath& src) const { |
if (fWidth <= 0) { // hairline or fill |
return false; |
@@ -111,9 +117,10 @@ bool SkStrokeRec::applyToPath(SkPath* dst, const SkPath& src) const { |
stroker.setMiterLimit(fMiterLimit); |
stroker.setWidth(fWidth); |
stroker.setDoFill(fStrokeAndFill); |
+#if defined SK_QUAD_STROKE_APPROXIMATION && defined SK_DEBUG |
+ stroker.setResScale(gDebugStrokerErrorSet ? gDebugStrokerError : fResScale); |
+#else |
stroker.setResScale(fResScale); |
-#if QUAD_STROKE_APPROXIMATION |
- stroker.setError(1); |
#endif |
stroker.strokePath(src, dst); |
return true; |