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

Unified Diff: src/pathops/SkOpContour.h

Issue 1037953004: add conics to path ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: turn off pathops specific debuggging Created 5 years, 8 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 | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkOpContour.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpContour.h
diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h
index 495b643fffe7904c967f312279258436d060ff10..184ee92ddffd96d619a7833fe058c19619ef260a 100644
--- a/src/pathops/SkOpContour.h
+++ b/src/pathops/SkOpContour.h
@@ -32,6 +32,10 @@ public:
: fBounds.fTop < rh.fBounds.fTop;
}
+ void addConic(SkPoint pts[3], SkScalar weight, SkChunkAlloc* allocator) {
+ appendSegment(allocator).addConic(pts, weight, this);
+ }
+
void addCubic(SkPoint pts[4], SkChunkAlloc* allocator) {
appendSegment(allocator).addCubic(pts, this);
}
@@ -98,11 +102,11 @@ public:
}
int debugID() const {
- return PATH_OPS_DEBUG_RELEASE(fID, -1);
+ return SkDEBUGRELEASE(fID, -1);
}
int debugIndent() const {
- return PATH_OPS_DEBUG_RELEASE(fIndent, 0);
+ return SkDEBUGRELEASE(fIndent, 0);
}
#if DEBUG_ACTIVE_SPANS
@@ -115,23 +119,23 @@ public:
#endif
const SkOpAngle* debugAngle(int id) const {
- return PATH_OPS_DEBUG_RELEASE(globalState()->debugAngle(id), NULL);
+ return SkDEBUGRELEASE(globalState()->debugAngle(id), NULL);
}
SkOpContour* debugContour(int id) {
- return PATH_OPS_DEBUG_RELEASE(globalState()->debugContour(id), NULL);
+ return SkDEBUGRELEASE(globalState()->debugContour(id), NULL);
}
const SkOpPtT* debugPtT(int id) const {
- return PATH_OPS_DEBUG_RELEASE(globalState()->debugPtT(id), NULL);
+ return SkDEBUGRELEASE(globalState()->debugPtT(id), NULL);
}
const SkOpSegment* debugSegment(int id) const {
- return PATH_OPS_DEBUG_RELEASE(globalState()->debugSegment(id), NULL);
+ return SkDEBUGRELEASE(globalState()->debugSegment(id), NULL);
}
const SkOpSpanBase* debugSpan(int id) const {
- return PATH_OPS_DEBUG_RELEASE(globalState()->debugSpan(id), NULL);
+ return SkDEBUGRELEASE(globalState()->debugSpan(id), NULL);
}
SkOpGlobalState* globalState() const {
@@ -181,13 +185,14 @@ public:
}
void indentDump() {
- PATH_OPS_DEBUG_CODE(fIndent += 2);
+ SkDEBUGCODE(fIndent += 2);
}
void init(SkOpGlobalState* globalState, bool operand, bool isXor) {
fState = globalState;
fOperand = operand;
fXor = isXor;
+ SkDEBUGCODE(fID = globalState->nextContourID());
}
bool isXor() const {
@@ -236,7 +241,7 @@ public:
}
void outdentDump() {
- PATH_OPS_DEBUG_CODE(fIndent -= 2);
+ SkDEBUGCODE(fIndent -= 2);
}
void remove(SkOpContour* contour) {
@@ -262,7 +267,7 @@ public:
fDone = false;
SkDEBUGCODE(fBounds.set(SK_ScalarMax, SK_ScalarMax, SK_ScalarMin, SK_ScalarMin));
SkDEBUGCODE(fFirstSorted = -1);
- PATH_OPS_DEBUG_CODE(fIndent = 0);
+ SkDEBUGCODE(fIndent = 0);
}
void setBounds() {
@@ -349,8 +354,8 @@ private:
bool fOperand; // true for the second argument to a binary operator
bool fXor; // set if original path had even-odd fill
bool fOppXor; // set if opposite path had even-odd fill
- PATH_OPS_DEBUG_CODE(int fID);
- PATH_OPS_DEBUG_CODE(int fIndent);
+ SkDEBUGCODE(int fID);
+ SkDEBUGCODE(int fIndent);
};
#endif
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkOpContour.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698