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

Unified Diff: src/pathops/SkOpSegment.h

Issue 75453003: optimize pathops coverage (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove fill parameter from reduce order Created 7 years, 1 month 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 | « src/pathops/SkDCubicToQuads.cpp ('k') | src/pathops/SkReduceOrder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpSegment.h
diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h
index 55e516e35c22e0330aeb2204d5b238bbe26c179b..79d83b1155fbd8728d3d0e986f78c270e97b74a8 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -183,7 +183,6 @@ public:
return result;
}
- // OPTIMIZATION: mark as debugging only if used solely by tests
double t(int tIndex) const {
return fTs[tIndex].fT;
}
@@ -212,13 +211,11 @@ public:
return fTs[tIndex].fWindValue;
}
+#if defined(SK_DEBUG) || DEBUG_WINDING
SkScalar xAtT(int index) const {
return xAtT(&fTs[index]);
}
-
- SkScalar xAtT(const SkOpSpan* span) const {
- return xyAtT(span).fX;
- }
+#endif
const SkPoint& xyAtT(const SkOpSpan* span) const {
return span->fPt;
@@ -228,13 +225,11 @@ public:
return xyAtT(&fTs[index]);
}
+#if defined(SK_DEBUG) || DEBUG_WINDING
SkScalar yAtT(int index) const {
return yAtT(&fTs[index]);
}
-
- SkScalar yAtT(const SkOpSpan* span) const {
- return xyAtT(span).fY;
- }
+#endif
bool activeAngle(int index, int* done, SkTArray<SkOpAngle, true>* angles);
SkPoint activeLeftTop(bool onlySortable, int* firstT) const;
@@ -403,6 +398,15 @@ private:
static bool UseInnerWindingReverse(int outerWinding, int innerWinding);
SkOpSpan* verifyOneWinding(const char* funName, int tIndex);
SkOpSpan* verifyOneWindingU(const char* funName, int tIndex);
+
+ SkScalar xAtT(const SkOpSpan* span) const {
+ return xyAtT(span).fX;
+ }
+
+ SkScalar yAtT(const SkOpSpan* span) const {
+ return xyAtT(span).fY;
+ }
+
void zeroSpan(SkOpSpan* span);
#if DEBUG_SWAP_TOP
« no previous file with comments | « src/pathops/SkDCubicToQuads.cpp ('k') | src/pathops/SkReduceOrder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698