aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-10-09 15:45:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-09 21:20:34 +0000
commit63fd760a37905c45d26fc3d49cac261fad1b4808 (patch)
tree279aa7293ea1773ac60230790868fe0e1fc725b0 /src/pathops
parenta49909aa24a370d6dff98d300d0c42ff8cd2c623 (diff)
Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/pathops')
-rw-r--r--src/pathops/SkAddIntersections.cpp2
-rw-r--r--src/pathops/SkDLineIntersection.cpp4
-rw-r--r--src/pathops/SkOpCubicHull.cpp2
-rw-r--r--src/pathops/SkOpSpan.cpp2
-rw-r--r--src/pathops/SkPathOpsCommon.cpp2
-rw-r--r--src/pathops/SkPathOpsDebug.cpp14
-rw-r--r--src/pathops/SkPathOpsDebug.h2
-rw-r--r--src/pathops/SkPathOpsTSect.cpp24
-rw-r--r--src/pathops/SkPathWriter.cpp2
-rw-r--r--src/pathops/SkPathWriter.h2
10 files changed, 28 insertions, 28 deletions
diff --git a/src/pathops/SkAddIntersections.cpp b/src/pathops/SkAddIntersections.cpp
index b9f2d8dee2..f772cc2b06 100644
--- a/src/pathops/SkAddIntersections.cpp
+++ b/src/pathops/SkAddIntersections.cpp
@@ -521,7 +521,7 @@ bool AddIntersectTs(SkOpContour* test, SkOpContour* next, SkOpCoincidence* coinc
SkOpPtT* nextTAt = iPtIsIntegral ? wn.segment()->addT(ts[!swap][pt], iPt)
: wn.segment()->addT(ts[!swap][pt]);
if (!testTAt->contains(nextTAt)) {
- SkOpPtT* oppPrev = testTAt->oppPrev(nextTAt); // Returns nullptr if pair
+ SkOpPtT* oppPrev = testTAt->oppPrev(nextTAt); // Returns nullptr if pair
if (oppPrev) { // already share a pt-t loop.
testTAt->span()->mergeMatches(nextTAt->span());
testTAt->addOpp(nextTAt, oppPrev);
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp
index 082e2987b9..5540c5c165 100644
--- a/src/pathops/SkDLineIntersection.cpp
+++ b/src/pathops/SkDLineIntersection.cpp
@@ -122,10 +122,10 @@ int SkIntersections::intersect(const SkDLine& a, const SkDLine& b) {
computePoints(a, 1);
}
}
-/* Allow tracking that both sets of end points are near each other -- the lines are entirely
+/* Allow tracking that both sets of end points are near each other -- the lines are entirely
coincident -- even when the end points are not exactly the same.
Mark this as a 'wild card' for the end points, so that either point is considered totally
- coincident. Then, avoid folding the lines over each other, but allow either end to mate
+ coincident. Then, avoid folding the lines over each other, but allow either end to mate
to the next set of lines.
*/
if (fAllowNear || !unparallel) {
diff --git a/src/pathops/SkOpCubicHull.cpp b/src/pathops/SkOpCubicHull.cpp
index 6b17608e84..a733138ad4 100644
--- a/src/pathops/SkOpCubicHull.cpp
+++ b/src/pathops/SkOpCubicHull.cpp
@@ -97,7 +97,7 @@ int SkDCubic::convexHull(char order[4]) const {
order[2] = 1;
return 3;
}
- // one of the control points may be very nearly but not exactly equal --
+ // one of the control points may be very nearly but not exactly equal --
double dist1_0 = fPts[1].distanceSquared(fPts[0]);
double dist1_3 = fPts[1].distanceSquared(fPts[3]);
double dist2_0 = fPts[2].distanceSquared(fPts[0]);
diff --git a/src/pathops/SkOpSpan.cpp b/src/pathops/SkOpSpan.cpp
index 40d6383c74..28989d9511 100644
--- a/src/pathops/SkOpSpan.cpp
+++ b/src/pathops/SkOpSpan.cpp
@@ -327,7 +327,7 @@ void SkOpSpanBase::mergeMatches(SkOpSpanBase* opp) {
}
SkOpSpanBase* innerBase = inner->span();
SkASSERT(innerBase->ptT() == inner);
- // when the intersection is first detected, the span base is marked if there are
+ // when the intersection is first detected, the span base is marked if there are
// more than one point in the intersection.
if (!zero_or_one(inner->fT)) {
innerBase->upCast()->release(test);
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp
index 9cdf8124a8..feba8d38a8 100644
--- a/src/pathops/SkPathOpsCommon.cpp
+++ b/src/pathops/SkPathOpsCommon.cpp
@@ -326,7 +326,7 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc
// adjust the winding value to account for coincident edges
if (!pairs->apply(DEBUG_ITER_ONLY_PARAMS(SAFETY_COUNT - safetyHatch))) {
return false;
- }
+ }
// For each coincident pair that overlaps another, when the receivers (the 1st of the pair)
// are different, construct a new pair to resolve their mutual span
if (!pairs->findOverlaps(&overlaps DEBUG_ITER_PARAMS(SAFETY_COUNT - safetyHatch))) {
diff --git a/src/pathops/SkPathOpsDebug.cpp b/src/pathops/SkPathOpsDebug.cpp
index f0a8da3136..b3ca85210b 100644
--- a/src/pathops/SkPathOpsDebug.cpp
+++ b/src/pathops/SkPathOpsDebug.cpp
@@ -1122,7 +1122,7 @@ void SkOpSegment::debugSetCoinT(int index, SkScalar t) const {
fDebugBaseMin = SkTMin(t, fDebugBaseMin);
fDebugBaseMax = SkTMax(t, fDebugBaseMax);
return;
- }
+ }
SkASSERT(fDebugBaseMin >= t || t >= fDebugBaseMax);
if (fDebugLastMax < 0 || fDebugLastIndex == index) {
fDebugLastIndex = index;
@@ -1840,8 +1840,8 @@ void SkOpCoincidence::debugAddOrOverlap(SkPathOpsDebug::GlitchLog* log,
}
this->debugValidate();
RETURN_FALSE_IF(csDeleted, coinSeg);
- RETURN_FALSE_IF(osDeleted, oppSeg);
- RETURN_FALSE_IF(ceDeleted, coinSeg);
+ RETURN_FALSE_IF(osDeleted, oppSeg);
+ RETURN_FALSE_IF(ceDeleted, coinSeg);
RETURN_FALSE_IF(oeDeleted, oppSeg);
RETURN_FALSE_IF(!cs || !ce || cs == ce || cs->contains(ce) || !os || !oe || os == oe || os->contains(oe), coinSeg);
bool result = true;
@@ -2508,7 +2508,7 @@ void SkOpSpanBase::debugMergeMatches(SkPathOpsDebug::GlitchLog* log, const SkOpS
}
const SkOpSpanBase* innerBase = inner->span();
SkASSERT(innerBase->ptT() == inner);
- // when the intersection is first detected, the span base is marked if there are
+ // when the intersection is first detected, the span base is marked if there are
// more than one point in the intersection.
// if (!innerBase->hasMultipleHint() && !testBase->hasMultipleHint()) {
if (!zero_or_one(inner->fT)) {
@@ -2537,7 +2537,7 @@ void SkOpSpanBase::debugMergeMatches(SkPathOpsDebug::GlitchLog* log, const SkOpS
SkOPASSERT(0);
}
#endif
- break;
+ break;
// }
break;
} while ((inner = inner->next()) != innerStop);
@@ -2793,13 +2793,13 @@ const SkOpPtT* SkOpPtT::debugOppPrev(const SkOpPtT* opp) const {
void SkOpPtT::debugResetCoinT() const {
#if DEBUG_COINCIDENCE_ORDER
- this->segment()->debugResetCoinT();
+ this->segment()->debugResetCoinT();
#endif
}
void SkOpPtT::debugSetCoinT(int index) const {
#if DEBUG_COINCIDENCE_ORDER
- this->segment()->debugSetCoinT(index, fT);
+ this->segment()->debugSetCoinT(index, fT);
#endif
}
diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h
index 65aedc55df..afdfb32be1 100644
--- a/src/pathops/SkPathOpsDebug.h
+++ b/src/pathops/SkPathOpsDebug.h
@@ -134,7 +134,7 @@ class SkOpContourHead;
extern int gDumpTSectNum;
#endif
-#if DEBUG_COINCIDENCE || DEBUG_COINCIDENCE_DUMP
+#if DEBUG_COINCIDENCE || DEBUG_COINCIDENCE_DUMP
#define DEBUG_COIN 1
#else
#define DEBUG_COIN 0
diff --git a/src/pathops/SkPathOpsTSect.cpp b/src/pathops/SkPathOpsTSect.cpp
index 9bff5af4f0..e096837cec 100644
--- a/src/pathops/SkPathOpsTSect.cpp
+++ b/src/pathops/SkPathOpsTSect.cpp
@@ -8,54 +8,54 @@
#include "SkPathOpsTSect.h"
int SkIntersections::intersect(const SkDQuad& quad1, const SkDQuad& quad2) {
- SkTSect<SkDQuad, SkDQuad> sect1(quad1
+ SkTSect<SkDQuad, SkDQuad> sect1(quad1
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
- SkTSect<SkDQuad, SkDQuad> sect2(quad2
+ SkTSect<SkDQuad, SkDQuad> sect2(quad2
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
SkTSect<SkDQuad, SkDQuad>::BinarySearch(&sect1, &sect2, this);
return used();
}
int SkIntersections::intersect(const SkDConic& conic, const SkDQuad& quad) {
- SkTSect<SkDConic, SkDQuad> sect1(conic
+ SkTSect<SkDConic, SkDQuad> sect1(conic
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
- SkTSect<SkDQuad, SkDConic> sect2(quad
+ SkTSect<SkDQuad, SkDConic> sect2(quad
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
SkTSect<SkDConic, SkDQuad>::BinarySearch(&sect1, &sect2, this);
return used();
}
int SkIntersections::intersect(const SkDConic& conic1, const SkDConic& conic2) {
- SkTSect<SkDConic, SkDConic> sect1(conic1
+ SkTSect<SkDConic, SkDConic> sect1(conic1
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
- SkTSect<SkDConic, SkDConic> sect2(conic2
+ SkTSect<SkDConic, SkDConic> sect2(conic2
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
SkTSect<SkDConic, SkDConic>::BinarySearch(&sect1, &sect2, this);
return used();
}
int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) {
- SkTSect<SkDCubic, SkDQuad> sect1(cubic
+ SkTSect<SkDCubic, SkDQuad> sect1(cubic
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
- SkTSect<SkDQuad, SkDCubic> sect2(quad
+ SkTSect<SkDQuad, SkDCubic> sect2(quad
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
SkTSect<SkDCubic, SkDQuad>::BinarySearch(&sect1, &sect2, this);
return used();
}
int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) {
- SkTSect<SkDCubic, SkDConic> sect1(cubic
+ SkTSect<SkDCubic, SkDConic> sect1(cubic
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
- SkTSect<SkDConic, SkDCubic> sect2(conic
+ SkTSect<SkDConic, SkDCubic> sect2(conic
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
SkTSect<SkDCubic, SkDConic>::BinarySearch(&sect1, &sect2, this);
return used();
}
int SkIntersections::intersect(const SkDCubic& cubic1, const SkDCubic& cubic2) {
- SkTSect<SkDCubic, SkDCubic> sect1(cubic1
+ SkTSect<SkDCubic, SkDCubic> sect1(cubic1
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
- SkTSect<SkDCubic, SkDCubic> sect2(cubic2
+ SkTSect<SkDCubic, SkDCubic> sect2(cubic2
SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
SkTSect<SkDCubic, SkDCubic>::BinarySearch(&sect1, &sect2, this);
return used();
diff --git a/src/pathops/SkPathWriter.cpp b/src/pathops/SkPathWriter.cpp
index 9893a502ca..7291002593 100644
--- a/src/pathops/SkPathWriter.cpp
+++ b/src/pathops/SkPathWriter.cpp
@@ -237,7 +237,7 @@ void SkPathWriter::assemble() {
double dist = dx * dx + dy * dy;
distLookup.push_back(rRow + iIndex);
distances.push_back(dist); // oStart distance from iStart
- sortedDist.push_back(dIndex++);
+ sortedDist.push_back(dIndex++);
}
rRow += endCount;
}
diff --git a/src/pathops/SkPathWriter.h b/src/pathops/SkPathWriter.h
index 5dd1bf6f60..6534b840c1 100644
--- a/src/pathops/SkPathWriter.h
+++ b/src/pathops/SkPathWriter.h
@@ -43,7 +43,7 @@ private:
bool someAssemblyRequired();
void update(const SkOpPtT* pt);
- SkPath fCurrent; // contour under construction
+ SkPath fCurrent; // contour under construction
SkTArray<SkPath> fPartials; // contours with mismatched starts and ends
SkTDArray<const SkOpPtT*> fEndPtTs; // possible pt values for partial starts and ends
SkPath* fPathPtr; // closed contours are written here