Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: samplecode/SampleQuadStroker.cpp

Issue 1157623003: remove SK_LEGACY_STROKE_CURVES (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: work in progress Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkStroke.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleQuadStroker.cpp
diff --git a/samplecode/SampleQuadStroker.cpp b/samplecode/SampleQuadStroker.cpp
index 05b6204026bb9a3e18fbd1dac3d936160e1bea78..91a6a0f5d8327a40893c13f20ec24c6b8438bf10 100644
--- a/samplecode/SampleQuadStroker.cpp
+++ b/samplecode/SampleQuadStroker.cpp
@@ -122,7 +122,7 @@ class QuadStrokerView : public SampleView {
bool fAnimate;
bool fDrawRibs;
bool fDrawTangents;
-#if !defined SK_LEGACY_STROKE_CURVES && defined(SK_DEBUG)
+#ifdef SK_DEBUG
#define kStrokerErrorMin 0.001f
#define kStrokerErrorMax 5
#endif
@@ -529,7 +529,7 @@ protected:
if (fConicButton.fEnabled) {
draw_control(canvas, fWeightControl, fWeight, 0, 5, "weight");
}
-#if !defined SK_LEGACY_STROKE_CURVES && defined(SK_DEBUG)
+#ifdef SK_DEBUG
draw_control(canvas, fErrorControl, gDebugStrokerError, kStrokerErrorMin, kStrokerErrorMax,
"error");
#endif
@@ -561,7 +561,7 @@ protected:
if (fWeightControl.contains(rectPt)) {
return new MyClick(this, (int) SK_ARRAY_COUNT(fPts) + 1);
}
-#if !defined SK_LEGACY_STROKE_CURVES && defined(SK_DEBUG)
+#ifdef SK_DEBUG
if (fErrorControl.contains(rectPt)) {
return new MyClick(this, (int) SK_ARRAY_COUNT(fPts) + 2);
}
@@ -612,7 +612,7 @@ protected:
} else if (index == (int) SK_ARRAY_COUNT(fPts) + 1) {
fWeight = MapScreenYtoValue(click->fICurr.fY, fWeightControl, 0, 5);
}
-#if !defined SK_LEGACY_STROKE_CURVES && defined(SK_DEBUG)
+#ifdef SK_DEBUG
else if (index == (int) SK_ARRAY_COUNT(fPts) + 2) {
gDebugStrokerError = SkTMax(FLT_EPSILON, MapScreenYtoValue(click->fICurr.fY,
fErrorControl, kStrokerErrorMin, kStrokerErrorMax));
« no previous file with comments | « no previous file | src/core/SkStroke.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698