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

Side by Side Diff: src/pathops/SkOpSegment.h

Issue 2237223002: pathops coincident work (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused code Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef SkOpSegment_DEFINE 7 #ifndef SkOpSegment_DEFINE
8 #define SkOpSegment_DEFINE 8 #define SkOpSegment_DEFINE
9 9
10 #include "SkOpAngle.h" 10 #include "SkOpAngle.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const SkPathOpsBounds& bounds() const { 101 const SkPathOpsBounds& bounds() const {
102 return fBounds; 102 return fBounds;
103 } 103 }
104 104
105 void bumpCount() { 105 void bumpCount() {
106 ++fCount; 106 ++fCount;
107 } 107 }
108 108
109 void calcAngles(); 109 void calcAngles();
110 bool collapsed() const; 110 bool collapsed() const;
111 bool collapsed(double startT, double endT) const;
111 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle, 112 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle,
112 SkOpAngle::IncludeType ); 113 SkOpAngle::IncludeType );
113 static void ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngle, 114 static void ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngle,
114 SkOpAngle::IncludeType ); 115 SkOpAngle::IncludeType );
115 int computeSum(SkOpSpanBase* start, SkOpSpanBase* end, SkOpAngle::IncludeTyp e includeType); 116 int computeSum(SkOpSpanBase* start, SkOpSpanBase* end, SkOpAngle::IncludeTyp e includeType);
116 117
117 void clearAll(); 118 void clearAll();
118 void clearOne(SkOpSpan* span); 119 void clearOne(SkOpSpan* span);
119 static void ClearVisited(SkOpSpanBase* span); 120 static void ClearVisited(SkOpSpanBase* span);
120 bool contains(double t) const; 121 bool contains(double t) const;
121 122
122 SkOpContour* contour() const { 123 SkOpContour* contour() const {
123 return fContour; 124 return fContour;
124 } 125 }
125 126
126 int count() const { 127 int count() const {
127 return fCount; 128 return fCount;
128 } 129 }
129 130
130 void debugAddAngle(double startT, double endT); 131 void debugAddAngle(double startT, double endT);
131 const SkOpPtT* debugAddT(double t) const; 132 #if DEBUG_COINCIDENCE_VERBOSE
133 const SkOpPtT* debugAddT(double t, const char* id, SkPathOpsDebug::GlitchLog * ) const;
134 #endif
132 const SkOpAngle* debugAngle(int id) const; 135 const SkOpAngle* debugAngle(int id) const;
133 #if DEBUG_ANGLE 136 #if DEBUG_ANGLE
134 void debugCheckAngleCoin() const; 137 void debugCheckAngleCoin() const;
135 #endif 138 #endif
136 #if DEBUG_COINCIDENCE_VERBOSE 139 #if DEBUG_COINCIDENCE_VERBOSE
137 void debugCheckHealth(const char* id, SkPathOpsDebug::GlitchLog* ) const; 140 void debugCheckHealth(const char* id, SkPathOpsDebug::GlitchLog* ) const;
138 void debugClearAll(const char* id, SkPathOpsDebug::GlitchLog* glitches) cons t; 141 void debugClearAll(const char* id, SkPathOpsDebug::GlitchLog* glitches) cons t;
139 void debugClearOne(const SkOpSpan* span, const char* id, SkPathOpsDebug::Gli tchLog* glitches) const; 142 void debugClearOne(const SkOpSpan* span, const char* id, SkPathOpsDebug::Gli tchLog* glitches) const;
140 #endif 143 #endif
141 const SkOpCoincidence* debugCoincidence() const; 144 const SkOpCoincidence* debugCoincidence() const;
142 SkOpContour* debugContour(int id); 145 SkOpContour* debugContour(int id) const;
143 146
144 int debugID() const { 147 int debugID() const {
145 return SkDEBUGRELEASE(fID, -1); 148 return SkDEBUGRELEASE(fID, -1);
146 } 149 }
147 150
148 SkOpAngle* debugLastAngle(); 151 SkOpAngle* debugLastAngle();
149 #if DEBUG_COINCIDENCE_VERBOSE 152 #if DEBUG_COINCIDENCE_VERBOSE
150 void debugMissingCoincidence(const char* id, SkPathOpsDebug::GlitchLog* glit ches) const; 153 void debugMissingCoincidence(const char* id, SkPathOpsDebug::GlitchLog* glit ches) const;
151 void debugMoveMultiples(const char* id, SkPathOpsDebug::GlitchLog* glitches) const; 154 void debugMoveMultiples(const char* id, SkPathOpsDebug::GlitchLog* glitches) const;
152 void debugMoveNearby(const char* id, SkPathOpsDebug::GlitchLog* glitches) co nst; 155 void debugMoveNearby(const char* id, SkPathOpsDebug::GlitchLog* glitches) co nst;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis- a-vis the ref seg 451 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis- a-vis the ref seg
449 mutable SkScalar fDebugBaseMax; 452 mutable SkScalar fDebugBaseMax;
450 mutable int fDebugLastIndex; 453 mutable int fDebugLastIndex;
451 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base has same sign 454 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base has same sign
452 mutable SkScalar fDebugLastMax; 455 mutable SkScalar fDebugLastMax;
453 #endif 456 #endif
454 SkDEBUGCODE(int fID); 457 SkDEBUGCODE(int fID);
455 }; 458 };
456 459
457 #endif 460 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698