Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
diff --git a/src/pathops/SkDConicLineIntersection.cpp b/src/pathops/SkDConicLineIntersection.cpp
index c9d825d..e6d775f 100644
--- a/src/pathops/SkDConicLineIntersection.cpp
+++ b/src/pathops/SkDConicLineIntersection.cpp
@@ -25,8 +25,8 @@
 
     LineConicIntersections(const SkDConic& c)
         : fConic(c)
-        SkDEBUGPARAMS(fLine(NULL))
-        SkDEBUGPARAMS(fIntersections(NULL))
+        SkDEBUGPARAMS(fLine(nullptr))
+        SkDEBUGPARAMS(fIntersections(nullptr))
         SkDEBUGPARAMS(fAllowNear(false)) {
     }
 
@@ -39,7 +39,7 @@
         for (int index = 0; index < last; ) {
             double conicMidT = ((*fIntersections)[0][index] + (*fIntersections)[0][index + 1]) / 2;
             SkDPoint conicMidPt = fConic.ptAtT(conicMidT);
-            double t = fLine->nearPoint(conicMidPt, NULL);
+            double t = fLine->nearPoint(conicMidPt, nullptr);
             if (t < 0) {
                 ++index;
                 continue;
@@ -186,7 +186,7 @@
             if (fIntersections->hasT(conicT)) {
                 continue;
             }
-            double lineT = fLine->nearPoint(fConic[cIndex], NULL);
+            double lineT = fLine->nearPoint(fConic[cIndex], nullptr);
             if (lineT < 0) {
                 continue;
             }
diff --git a/src/pathops/SkDCubicLineIntersection.cpp b/src/pathops/SkDCubicLineIntersection.cpp
index ee1e3d3..cbdce77 100644
--- a/src/pathops/SkDCubicLineIntersection.cpp
+++ b/src/pathops/SkDCubicLineIntersection.cpp
@@ -98,7 +98,7 @@
         for (int index = 0; index < last; ) {
             double cubicMidT = ((*fIntersections)[0][index] + (*fIntersections)[0][index + 1]) / 2;
             SkDPoint cubicMidPt = fCubic.ptAtT(cubicMidT);
-            double t = fLine.nearPoint(cubicMidPt, NULL);
+            double t = fLine.nearPoint(cubicMidPt, nullptr);
             if (t < 0) {
                 ++index;
                 continue;
@@ -285,7 +285,7 @@
             if (fIntersections->hasT(cubicT)) {
                 continue;
             }
-            double lineT = fLine.nearPoint(fCubic[cIndex], NULL);
+            double lineT = fLine.nearPoint(fCubic[cIndex], nullptr);
             if (lineT < 0) {
                 continue;
             }
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp
index bfbbc7e..6fbac97 100644
--- a/src/pathops/SkDLineIntersection.cpp
+++ b/src/pathops/SkDLineIntersection.cpp
@@ -235,12 +235,12 @@
         }
     }
     if (fAllowNear || result == 2) {
-        if ((t = line.nearPoint(leftPt, NULL)) >= 0) {
+        if ((t = line.nearPoint(leftPt, nullptr)) >= 0) {
             insert(t, (double) flipped, leftPt);
         }
         if (left != right) {
             const SkDPoint rightPt = { right, y };
-            if ((t = line.nearPoint(rightPt, NULL)) >= 0) {
+            if ((t = line.nearPoint(rightPt, nullptr)) >= 0) {
                 insert(t, (double) !flipped, rightPt);
             }
             for (int index = 0; index < 2; ++index) {
@@ -311,12 +311,12 @@
         }
     }
     if (fAllowNear || result == 2) {
-        if ((t = line.nearPoint(topPt, NULL)) >= 0) {
+        if ((t = line.nearPoint(topPt, nullptr)) >= 0) {
             insert(t, (double) flipped, topPt);
         }
         if (top != bottom) {
             SkDPoint bottomPt = { x, bottom };
-            if ((t = line.nearPoint(bottomPt, NULL)) >= 0) {
+            if ((t = line.nearPoint(bottomPt, nullptr)) >= 0) {
                 insert(t, (double) !flipped, bottomPt);
             }
             for (int index = 0; index < 2; ++index) {
diff --git a/src/pathops/SkDQuadLineIntersection.cpp b/src/pathops/SkDQuadLineIntersection.cpp
index 5e3596e..64eb868 100644
--- a/src/pathops/SkDQuadLineIntersection.cpp
+++ b/src/pathops/SkDQuadLineIntersection.cpp
@@ -103,8 +103,8 @@
 
     LineQuadraticIntersections(const SkDQuad& q)
         : fQuad(q) 
-        SkDEBUGPARAMS(fLine(NULL))
-        SkDEBUGPARAMS(fIntersections(NULL))
+        SkDEBUGPARAMS(fLine(nullptr))
+        SkDEBUGPARAMS(fIntersections(nullptr))
         SkDEBUGPARAMS(fAllowNear(false)) {
     }
 
@@ -117,7 +117,7 @@
         for (int index = 0; index < last; ) {
             double quadMidT = ((*fIntersections)[0][index] + (*fIntersections)[0][index + 1]) / 2;
             SkDPoint quadMidPt = fQuad.ptAtT(quadMidT);
-            double t = fLine->nearPoint(quadMidPt, NULL);
+            double t = fLine->nearPoint(quadMidPt, nullptr);
             if (t < 0) {
                 ++index;
                 continue;
@@ -291,7 +291,7 @@
             if (fIntersections->hasT(quadT)) {
                 continue;
             }
-            double lineT = fLine->nearPoint(fQuad[qIndex], NULL);
+            double lineT = fLine->nearPoint(fQuad[qIndex], nullptr);
             if (lineT < 0) {
                 continue;
             }
diff --git a/src/pathops/SkIntersectionHelper.h b/src/pathops/SkIntersectionHelper.h
index 79de034..647b94b 100644
--- a/src/pathops/SkIntersectionHelper.h
+++ b/src/pathops/SkIntersectionHelper.h
@@ -25,7 +25,7 @@
 
     bool advance() {
         fSegment = fSegment->next();
-        return fSegment != NULL;
+        return fSegment != nullptr;
     }
 
     SkScalar bottom() const {
@@ -76,7 +76,7 @@
 
     bool startAfter(const SkIntersectionHelper& after) {
         fSegment = after.fSegment->next();
-        return fSegment != NULL;
+        return fSegment != nullptr;
     }
 
     SkScalar top() const {
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index ac596fd..bb10e53 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -349,7 +349,7 @@
             goto recomputeSector;
         } while (!oSpan->final() && (oSpan = oSpan->upCast()->next()));
         checkEnd = stepUp ? !checkEnd->final()
-                ? checkEnd->upCast()->next() : NULL
+                ? checkEnd->upCast()->next() : nullptr
                 : checkEnd->prev();
     } while (checkEnd);
 recomputeSector:
@@ -659,7 +659,7 @@
         }
         return;
     }
-    bool singleton = NULL == fNext;
+    bool singleton = nullptr == fNext;
     if (singleton) {
         fNext = this;
     }
@@ -703,7 +703,7 @@
 SkOpSpanBase* SkOpAngle::lastMarked() const {
     if (fLastMarked) {
         if (fLastMarked->chased()) {
-            return NULL;
+            return nullptr;
         }
         fLastMarked->setChased(true);
     }
@@ -759,7 +759,7 @@
     } while (working != angle);
     do {
         SkOpAngle* next = working->fNext;
-        working->fNext = NULL;
+        working->fNext = nullptr;
         insert(working);
         working = next;
     } while (working != angle);
@@ -877,7 +877,7 @@
     fStart = start;
     fComputedEnd = fEnd = end;
     SkASSERT(start != end);
-    fNext = NULL;
+    fNext = nullptr;
     fComputeSector = fComputedSector = fCheckCoincidence = false;
     setSpans();
     setSector();
@@ -929,7 +929,7 @@
 
 void SkOpAngle::setSpans() {
     fUnorderable = false;
-    fLastMarked = NULL;
+    fLastMarked = nullptr;
     if (!fStart) {
         fUnorderable = true;
         return;
diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp
index 24a157a..4f53dee 100644
--- a/src/pathops/SkOpBuilder.cpp
+++ b/src/pathops/SkOpBuilder.cpp
@@ -44,7 +44,7 @@
     }
     SkChunkAlloc allocator(4096);
     SkOpContourHead contourHead;
-    SkOpGlobalState globalState(NULL, &contourHead  SkDEBUGPARAMS(NULL));
+    SkOpGlobalState globalState(nullptr, &contourHead  SkDEBUGPARAMS(nullptr));
     SkOpEdgeBuilder builder(*path, &contourHead, &allocator, &globalState);
     builder.finish(&allocator);
     SkASSERT(contourHead.next());
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 46d06e9..fb2de5a 100755
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -217,7 +217,7 @@
     }
     bool result;
     fTop = outer;
-    fHead = NULL;
+    fHead = nullptr;
     do {
     // addifmissing can modify the list that this is walking
     // maybe save head so that walker can iterate over old data unperturbed
@@ -467,7 +467,7 @@
 
 void SkOpCoincidence::detach(SkCoincidentSpans* remove) {
     SkCoincidentSpans* coin = fHead;
-    SkCoincidentSpans* prev = NULL;
+    SkCoincidentSpans* prev = nullptr;
     SkCoincidentSpans* next;
     do {
         next = coin->fNext;
@@ -505,7 +505,7 @@
                 expanded = true;
             }
         }
-        SkOpSpanBase* next = end->final() ? NULL : end->upCast()->next();
+        SkOpSpanBase* next = end->final() ? nullptr : end->upCast()->next();
         if (next && (oppPtT = next->contains(oppSegment))) {
             double midT = (end->t() + next->t()) / 2;
             if (segment->isClose(midT, oppSegment)) {
@@ -519,7 +519,7 @@
 }
 
 void SkOpCoincidence::findOverlaps(SkOpCoincidence* overlaps, SkChunkAlloc* allocator) const {
-    overlaps->fHead = overlaps->fTop = NULL;
+    overlaps->fHead = overlaps->fTop = nullptr;
     SkDEBUGCODE_(overlaps->debugSetGlobalState(fDebugState));
     SkCoincidentSpans* outer = fHead;
     while (outer) {
diff --git a/src/pathops/SkOpCoincidence.h b/src/pathops/SkOpCoincidence.h
index 83ba70a..86c6577 100644
--- a/src/pathops/SkOpCoincidence.h
+++ b/src/pathops/SkOpCoincidence.h
@@ -27,9 +27,9 @@
 class SkOpCoincidence {
 public:
     SkOpCoincidence()
-        : fHead(NULL)
-        , fTop(NULL)
-        SkDEBUGPARAMS(fDebugState(NULL))
+        : fHead(nullptr)
+        , fTop(nullptr)
+        SkDEBUGPARAMS(fDebugState(nullptr))
         {
     }
 
@@ -43,19 +43,19 @@
                   SkOpPtT* oppPtTEnd, bool flipped);
 
     const SkOpAngle* debugAngle(int id) const {
-        return SkDEBUGRELEASE(fDebugState->debugAngle(id), NULL);
+        return SkDEBUGRELEASE(fDebugState->debugAngle(id), nullptr);
     }
 
     SkOpContour* debugContour(int id) {
-        return SkDEBUGRELEASE(fDebugState->debugContour(id), NULL);
+        return SkDEBUGRELEASE(fDebugState->debugContour(id), nullptr);
     }
 
     const SkOpPtT* debugPtT(int id) const {
-        return SkDEBUGRELEASE(fDebugState->debugPtT(id), NULL);
+        return SkDEBUGRELEASE(fDebugState->debugPtT(id), nullptr);
     }
 
     const SkOpSegment* debugSegment(int id) const {
-        return SkDEBUGRELEASE(fDebugState->debugSegment(id), NULL);
+        return SkDEBUGRELEASE(fDebugState->debugSegment(id), nullptr);
     }
 
     void debugSetGlobalState(SkOpGlobalState* debugState) {
@@ -65,7 +65,7 @@
     void debugShowCoincidence() const;
 
     const SkOpSpanBase* debugSpan(int id) const {
-        return SkDEBUGRELEASE(fDebugState->debugSpan(id), NULL);
+        return SkDEBUGRELEASE(fDebugState->debugSpan(id), nullptr);
     }
 
     void detach(SkCoincidentSpans* );
diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp
index 18b6328..2e4b2ca 100644
--- a/src/pathops/SkOpContour.cpp
+++ b/src/pathops/SkOpContour.cpp
@@ -34,7 +34,7 @@
         default:
             SkASSERT(0);
     }
-    return NULL;
+    return nullptr;
 }
 
 void SkOpContour::toPath(SkPathWriter* path) const {
@@ -66,5 +66,5 @@
         segment->undoneSpan(startPtr, endPtr);
         return segment;
     } while ((segment = segment->next()));
-    return NULL;
+    return nullptr;
 }
diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h
index 7ef68b0..b420008 100644
--- a/src/pathops/SkOpContour.h
+++ b/src/pathops/SkOpContour.h
@@ -81,7 +81,7 @@
 
     SkOpContour* appendContour(SkChunkAlloc* allocator) {
         SkOpContour* contour = SkOpTAllocator<SkOpContour>::New(allocator);
-        contour->setNext(NULL);
+        contour->setNext(nullptr);
         SkOpContour* prev = this;
         SkOpContour* next;
         while ((next = prev->next())) {
@@ -129,23 +129,23 @@
 #endif
 
     const SkOpAngle* debugAngle(int id) const {
-        return SkDEBUGRELEASE(this->globalState()->debugAngle(id), NULL);
+        return SkDEBUGRELEASE(this->globalState()->debugAngle(id), nullptr);
     }
 
     SkOpContour* debugContour(int id) {
-        return SkDEBUGRELEASE(this->globalState()->debugContour(id), NULL);
+        return SkDEBUGRELEASE(this->globalState()->debugContour(id), nullptr);
     }
 
     const SkOpPtT* debugPtT(int id) const {
-        return SkDEBUGRELEASE(this->globalState()->debugPtT(id), NULL);
+        return SkDEBUGRELEASE(this->globalState()->debugPtT(id), nullptr);
     }
 
     const SkOpSegment* debugSegment(int id) const {
-        return SkDEBUGRELEASE(this->globalState()->debugSegment(id), NULL);
+        return SkDEBUGRELEASE(this->globalState()->debugSegment(id), nullptr);
     }
 
     const SkOpSpanBase* debugSpan(int id) const {
-        return SkDEBUGRELEASE(this->globalState()->debugSpan(id), NULL);
+        return SkDEBUGRELEASE(this->globalState()->debugSpan(id), nullptr);
     }
 
     SkOpGlobalState* globalState() const {
@@ -155,7 +155,7 @@
     void debugValidate() const {
 #if DEBUG_VALIDATE
         const SkOpSegment* segment = &fHead;
-        const SkOpSegment* prior = NULL;
+        const SkOpSegment* prior = nullptr;
         do {
             segment->debugValidate();
             SkASSERT(segment->prev() == prior);
@@ -302,7 +302,7 @@
             SkASSERT(fCount == 0);
             return;
         }
-        SkASSERT(contour->fNext == NULL);
+        SkASSERT(contour->fNext == nullptr);
         SkOpContour* prev = this;
         SkOpContour* next;
         while ((next = prev->next()) != contour) {
@@ -310,12 +310,12 @@
             prev = next;
         }
         SkASSERT(prev);
-        prev->setNext(NULL);
+        prev->setNext(nullptr);
     }
 
     void reset() {
-        fTail = NULL;
-        fNext = NULL;
+        fTail = nullptr;
+        fNext = nullptr;
         fCount = 0;
         fDone = false;
         fTopsFound = false;
diff --git a/src/pathops/SkOpEdgeBuilder.h b/src/pathops/SkOpEdgeBuilder.h
index f81f727..f11e0e4 100644
--- a/src/pathops/SkOpEdgeBuilder.h
+++ b/src/pathops/SkOpEdgeBuilder.h
@@ -37,7 +37,7 @@
     void complete() {
         if (fCurrentContour && fCurrentContour->count()) {
             fCurrentContour->complete();
-            fCurrentContour = NULL;
+            fCurrentContour = nullptr;
         }
     }
 
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp
index a52ef4a..99af13a 100644
--- a/src/pathops/SkOpSegment.cpp
+++ b/src/pathops/SkOpSegment.cpp
@@ -50,7 +50,7 @@
     if (SkOpAngle* result = activeAngleOther(start, startPtr, endPtr, done)) {
         return result;
     }
-    return NULL;
+    return nullptr;
 }
 
 SkOpAngle* SkOpSegment::activeAngleInner(SkOpSpanBase* start, SkOpSpanBase** startPtr,
@@ -91,7 +91,7 @@
             SkASSERT(downSpan->done());
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 SkOpAngle* SkOpSegment::activeAngleOther(SkOpSpanBase* start, SkOpSpanBase** startPtr,
@@ -297,7 +297,7 @@
 }
 
 SkOpPtT* SkOpSegment::addMissing(double t, SkOpSegment* opp, SkChunkAlloc* allocator) {
-    SkOpSpanBase* existing = NULL;
+    SkOpSpanBase* existing = nullptr;
     SkOpSpanBase* test = &fHead;
     double testT;
     do {
@@ -373,7 +373,7 @@
         SkASSERT(span != &fTail);
     } while ((span = span->upCast()->next()));
     SkASSERT(0);
-    return NULL;
+    return nullptr;
 }
 
 // choose a solitary t and pt value; remove aliases; align the opposite ends
@@ -519,7 +519,7 @@
         SkOpAngle::IncludeType includeType) {
     SkASSERT(includeType != SkOpAngle::kUnaryXor);
     SkOpAngle* firstAngle = this->spanToAngle(end, start);
-    if (NULL == firstAngle || NULL == firstAngle->next()) {
+    if (nullptr == firstAngle || nullptr == firstAngle->next()) {
         return SK_NaN32;
     }
     // if all angles have a computed winding,
@@ -528,7 +528,7 @@
     //  there's nothing to do
     // if two orderable angles are adjacent, and both are next to orderable angles,
     //  and one has winding computed, transfer to the other
-    SkOpAngle* baseAngle = NULL;
+    SkOpAngle* baseAngle = nullptr;
     bool tryReverse = false;
     // look for counterclockwise transfers
     SkOpAngle* angle = firstAngle->previous();
@@ -541,7 +541,7 @@
         SkASSERT(prior->next() == angle);
         SkASSERT(angle->next() == next);
         if (prior->unorderable() || angle->unorderable() || next->unorderable()) {
-            baseAngle = NULL;
+            baseAngle = nullptr;
             continue;
         }
         int testWinding = angle->starter()->windSum();
@@ -552,7 +552,7 @@
         }
         if (baseAngle) {
             ComputeOneSum(baseAngle, angle, includeType);
-            baseAngle = SK_MinS32 != angle->starter()->windSum() ? angle : NULL;
+            baseAngle = SK_MinS32 != angle->starter()->windSum() ? angle : nullptr;
         }
     } while (next != firstAngle);
     if (baseAngle && SK_MinS32 == firstAngle->starter()->windSum()) {
@@ -560,7 +560,7 @@
         tryReverse = true;
     }
     if (tryReverse) {
-        baseAngle = NULL;
+        baseAngle = nullptr;
         SkOpAngle* prior = firstAngle;
         do {
             angle = prior;
@@ -568,7 +568,7 @@
             SkASSERT(prior->next() == angle);
             next = angle->next();
             if (prior->unorderable() || angle->unorderable() || next->unorderable()) {
-                baseAngle = NULL;
+                baseAngle = nullptr;
                 continue;
             }
             int testWinding = angle->starter()->windSum();
@@ -578,7 +578,7 @@
             }
             if (baseAngle) {
                 ComputeOneSumReverse(baseAngle, angle, includeType);
-                baseAngle = SK_MinS32 != angle->starter()->windSum() ? angle : NULL;
+                baseAngle = SK_MinS32 != angle->starter()->windSum() ? angle : nullptr;
             }
         } while (prior != firstAngle);
     }
@@ -646,7 +646,7 @@
 #endif
         SkOpSpan* startSpan = start->starter(end);
         if (startSpan->done()) {
-            return NULL;
+            return nullptr;
         }
         markDone(startSpan);
         *nextEnd = step > 0 ? (*nextStart)->upCast()->next() : (*nextStart)->prev();
@@ -663,13 +663,13 @@
     if (!sortable) {
         *unsortable = true;
         markDone(start->starter(end));
-        return NULL;
+        return nullptr;
     }
     SkOpAngle* angle = this->spanToAngle(end, start);
     if (angle->unorderable()) {
         *unsortable = true;
         markDone(start->starter(end));
-        return NULL;
+        return nullptr;
     }
 #if DEBUG_SORT
     SkDebugf("%s\n", __FUNCTION__);
@@ -679,14 +679,14 @@
     if (sumMiWinding == SK_MinS32) {
         *unsortable = true;
         markDone(start->starter(end));
-        return NULL;
+        return nullptr;
     }
     int sumSuWinding = updateOppWinding(end, start);
     if (operand()) {
         SkTSwap<int>(sumMiWinding, sumSuWinding);
     }
     SkOpAngle* nextAngle = angle->next();
-    const SkOpAngle* foundAngle = NULL;
+    const SkOpAngle* foundAngle = nullptr;
     bool foundDone = false;
     // iterate through the angle, and compute everyone's winding
     SkOpSegment* nextSegment;
@@ -724,7 +724,7 @@
     } while ((nextAngle = nextAngle->next()) != angle);
     start->segment()->markDone(start->starter(end));
     if (!foundAngle) {
-        return NULL;
+        return nullptr;
     }
     *nextStart = foundAngle->start();
     *nextEnd = foundAngle->end();
@@ -751,7 +751,7 @@
 #endif
         SkOpSpan* startSpan = start->starter(end);
         if (startSpan->done()) {
-            return NULL;
+            return nullptr;
         }
         markDone(startSpan);
         *nextEnd = step > 0 ? (*nextStart)->upCast()->next() : (*nextStart)->prev();
@@ -768,13 +768,13 @@
     if (!sortable) {
         *unsortable = true;
         markDone(start->starter(end));
-        return NULL;
+        return nullptr;
     }
     SkOpAngle* angle = this->spanToAngle(end, start);
     if (angle->unorderable()) {
         *unsortable = true;
         markDone(start->starter(end));
-        return NULL;
+        return nullptr;
     }
 #if DEBUG_SORT
     SkDebugf("%s\n", __FUNCTION__);
@@ -782,7 +782,7 @@
 #endif
     int sumWinding = updateWinding(end, start);
     SkOpAngle* nextAngle = angle->next();
-    const SkOpAngle* foundAngle = NULL;
+    const SkOpAngle* foundAngle = nullptr;
     bool foundDone = false;
     // iterate through the angle, and compute everyone's winding
     SkOpSegment* nextSegment;
@@ -820,7 +820,7 @@
     } while ((nextAngle = nextAngle->next()) != angle);
     start->segment()->markDone(start->starter(end));
     if (!foundAngle) {
-        return NULL;
+        return nullptr;
     }
     *nextStart = foundAngle->start();
     *nextEnd = foundAngle->end();
@@ -847,7 +847,7 @@
 #endif
         SkOpSpan* startSpan = start->starter(end);
         if (startSpan->done()) {
-            return NULL;
+            return nullptr;
         }
         markDone(startSpan);
         *nextEnd = step > 0 ? (*nextStart)->upCast()->next() : (*nextStart)->prev();
@@ -863,14 +863,14 @@
     if (!angle || angle->unorderable()) {
         *unsortable = true;
         markDone(start->starter(end));
-        return NULL;
+        return nullptr;
     }
 #if DEBUG_SORT
     SkDebugf("%s\n", __FUNCTION__);
     angle->debugLoop();
 #endif
     SkOpAngle* nextAngle = angle->next();
-    const SkOpAngle* foundAngle = NULL;
+    const SkOpAngle* foundAngle = nullptr;
     bool foundDone = false;
     // iterate through the angle, and compute everyone's winding
     SkOpSegment* nextSegment;
@@ -888,7 +888,7 @@
     } while (nextAngle != angle);
     start->segment()->markDone(start->starter(end));
     if (!foundAngle) {
-        return NULL;
+        return nullptr;
     }
     *nextStart = foundAngle->start();
     *nextEnd = foundAngle->end();
@@ -906,7 +906,7 @@
 
 void SkOpSegment::init(SkPoint pts[], SkScalar weight, SkOpContour* contour, SkPath::Verb verb) {
     fContour = contour;
-    fNext = NULL;
+    fNext = nullptr;
     fOriginal[0] = pts[0];
     fOriginal[1] = pts[SkPathOpsVerbToPoints(verb)];
     fPts = pts;
@@ -918,7 +918,7 @@
     fTopsFound = false;
     fVisited = false;
     SkOpSpan* zeroSpan = &fHead;
-    zeroSpan->init(this, NULL, 0, fPts[0]);
+    zeroSpan->init(this, nullptr, 0, fPts[0]);
     SkOpSpanBase* oneSpan = &fTail;
     zeroSpan->setNext(oneSpan);
     oneSpan->initBase(this, zeroSpan, 1, fPts[SkPathOpsVerbToPoints(fVerb)]);
@@ -955,7 +955,7 @@
     int step = start->step(end);
     SkOpSpan* minSpan = start->starter(end);
     markDone(minSpan);
-    SkOpSpanBase* last = NULL;
+    SkOpSpanBase* last = nullptr;
     SkOpSegment* other = this;
     while ((other = other->nextChase(&start, &step, &minSpan, &last))) {
         if (other->done()) {
@@ -972,7 +972,7 @@
     SkOpSpan* spanStart = start->starter(end);
     int step = start->step(end);
     bool success = markWinding(spanStart, winding);
-    SkOpSpanBase* last = NULL;
+    SkOpSpanBase* last = nullptr;
     SkOpSegment* other = this;
     while ((other = other->nextChase(&start, &step, &spanStart, &last))) {
         if (spanStart->windSum() != SK_MinS32) {
@@ -993,7 +993,7 @@
     SkOpSpan* spanStart = start->starter(end);
     int step = start->step(end);
     bool success = markWinding(spanStart, winding, oppWinding);
-    SkOpSpanBase* last = NULL;
+    SkOpSpanBase* last = nullptr;
     SkOpSegment* other = this;
     while ((other = other->nextChase(&start, &step, &spanStart, &last))) {
         if (spanStart->windSum() != SK_MinS32) {
@@ -1051,7 +1051,7 @@
     if (oppMaxWinding != oppSumWinding && UseInnerWinding(oppMaxWinding, oppSumWinding)) {
         oppMaxWinding = oppSumWinding;
     }
-    SkOpSpanBase* last = NULL;
+    SkOpSpanBase* last = nullptr;
     // caller doesn't require that this marks anything
     (void) markAndChaseWinding(angle->start(), angle->end(), maxWinding, oppMaxWinding, &last);
 #if DEBUG_WINDING
@@ -1126,7 +1126,7 @@
     if (last) {
         *last = endSpan;
     }
-    return NULL;
+    return nullptr;
 }
 
 SkOpSegment* SkOpSegment::nextChase(SkOpSpanBase** startPtr, int* stepPtr, SkOpSpan** minPtr,
@@ -1139,9 +1139,9 @@
     SkOpSpanBase* foundSpan;
     SkOpSpanBase* otherEnd;
     SkOpSegment* other;
-    if (angle == NULL) {
+    if (angle == nullptr) {
         if (endSpan->t() != 0 && endSpan->t() != 1) {
-            return NULL;
+            return nullptr;
         }
         SkOpPtT* otherPtT = endSpan->ptT()->next();
         other = otherPtT->segment();
@@ -1153,8 +1153,8 @@
             return set_last(last, endSpan);
         }
         const SkOpAngle* next = angle->next();
-        if (NULL == next) {
-            return NULL;
+        if (nullptr == next) {
+            return nullptr;
         }
 #if DEBUG_WINDING
         if (angle->debugSign() != next->debugSign() && !angle->segment()->contour()->isXor()
@@ -1172,7 +1172,7 @@
     }
     SkASSERT(*startPtr);
     if (!otherEnd) {
-        return NULL;
+        return nullptr;
     }
 //    SkASSERT(otherEnd >= 0);
     SkOpSpan* origMin = step < 0 ? origStart->prev() : origStart->upCast();
@@ -1212,7 +1212,7 @@
     if (this->done()) {
         return false;
     }
-    SkOpSpan* prior = NULL;
+    SkOpSpan* prior = nullptr;
     SkOpSpanBase* spanBase = &fHead;
     do {
         SkOpPtT* ptT = spanBase->ptT(), * spanStopPtT = ptT;
@@ -1244,9 +1244,9 @@
             if (spanBase->containsCoinEnd(opp)) {
                 continue;
             } 
-            SkOpPtT* priorPtT = NULL, * priorStopPtT;
+            SkOpPtT* priorPtT = nullptr, * priorStopPtT;
             // find prior span containing opp segment
-            SkOpSegment* priorOpp = NULL;
+            SkOpSegment* priorOpp = nullptr;
             SkOpSpan* priorTest = spanBase->prev();
             while (!priorOpp && priorTest) {
                 priorStopPtT = priorPtT = priorTest->ptT();
@@ -1293,7 +1293,7 @@
                 SkTSwap(priorPtT, ptT);
             }
         }
-    } while ((spanBase = spanBase->final() ? NULL : spanBase->upCast()->next()));
+    } while ((spanBase = spanBase->final() ? nullptr : spanBase->upCast()->next()));
     clear_visited(&fHead);
     return false;
 }
@@ -1339,7 +1339,7 @@
             }
             SkOpSpanBase* oppNext = oppSpan;
             SkOpSpanBase* oppLast = oppSpan;
-            while ((oppNext = oppNext->final() ? NULL : oppNext->upCast()->next())) {
+            while ((oppNext = oppNext->final() ? nullptr : oppNext->upCast()->next())) {
                 if (!roughly_equal(oppNext->t(), oppSpan->t())) {
                     break;
                 }
@@ -1393,7 +1393,7 @@
         } while ((testPtT = testPtT->next()) != startPtT);
 checkNextSpan: 
         ;
-    } while ((test = test->final() ? NULL : test->upCast()->next()));
+    } while ((test = test->final() ? nullptr : test->upCast()->next()));
     debugValidate();
 }
 
@@ -1416,7 +1416,7 @@
         }
         do {  // iterate through all spans associated with start
             SkOpPtT* startBase = spanS->ptT();
-            next = test->final() ? NULL : test->upCast()->next();
+            next = test->final() ? nullptr : test->upCast()->next();
             do {
                 SkOpPtT* testBase = test->ptT();
                 do {
@@ -1506,7 +1506,7 @@
     SkOpSpanBase* span = &this->fHead;
     do {
         SkOpAngle* fromAngle = span->fromAngle();
-        SkOpAngle* toAngle = span->final() ? NULL : span->upCast()->toAngle();
+        SkOpAngle* toAngle = span->final() ? nullptr : span->upCast()->toAngle();
         if (!fromAngle && !toAngle) {
             continue;
         }
@@ -1560,11 +1560,11 @@
             }
         } while ((ptT = ptT->next()) != stopPtT);
         if (baseAngle->loopCount() == 1) {
-            span->setFromAngle(NULL);
+            span->setFromAngle(nullptr);
             if (toAngle) {
-                span->upCast()->setToAngle(NULL);
+                span->upCast()->setToAngle(nullptr);
             }
-            baseAngle = NULL;
+            baseAngle = nullptr;
         }
 #if DEBUG_SORT
         SkASSERT(!baseAngle || baseAngle->loopCount() > 1);
diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h
index a3f5989..d1cd29a 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -222,7 +222,7 @@
     }
 
     SkOpSegment* isSimple(SkOpSpanBase** end, int* step) {
-        return nextChase(end, step, NULL, NULL);
+        return nextChase(end, step, nullptr, nullptr);
     }
 
     bool isVertical() const {
diff --git a/src/pathops/SkOpSpan.cpp b/src/pathops/SkOpSpan.cpp
index df3ef3c..4d437f7 100755
--- a/src/pathops/SkOpSpan.cpp
+++ b/src/pathops/SkOpSpan.cpp
@@ -44,7 +44,7 @@
             return ptT;
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 SkOpContour* SkOpPtT::contour() const {
@@ -65,7 +65,7 @@
         ptT = ptT->fNext;
     } while (stopPtT != ptT);
     SkASSERT(0);
-    return NULL;
+    return nullptr;
 }
 
 SkOpPtT* SkOpPtT::find(SkOpSegment* segment) {
@@ -78,7 +78,7 @@
         ptT = ptT->fNext;
     } while (stopPtT != ptT);
     SkASSERT(0);
-    return NULL;
+    return nullptr;
 }
 
 SkOpGlobalState* SkOpPtT::globalState() const {
@@ -127,7 +127,7 @@
         prev = next;
     } while (prev != this);
     SkASSERT(0);
-    return NULL;
+    return nullptr;
 }
 
 void SkOpPtT::removeNext(SkOpPtT* kept) {
@@ -252,7 +252,7 @@
             return walk;
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 bool SkOpSpanBase::containsCoinEnd(const SkOpSegment* segment) const {
@@ -278,7 +278,7 @@
     fSegment = segment;
     fPtT.init(this, t, pt, false);
     fCoinEnd = this;
-    fFromAngle = NULL;
+    fFromAngle = nullptr;
     fPrev = prev;
     fSpanAdds = 0;
     fAligned = true;
@@ -354,7 +354,7 @@
     SkASSERT(t != 1);
     initBase(segment, prev, t, pt);
     fCoincident = this;
-    fToAngle = NULL;
+    fToAngle = nullptr;
     fWindSum = fOppSum = SK_MinS32;
     fWindValue = 1;
     fOppValue = 0;
diff --git a/src/pathops/SkOpSpan.h b/src/pathops/SkOpSpan.h
index 2a11c96..a2115df 100644
--- a/src/pathops/SkOpSpan.h
+++ b/src/pathops/SkOpSpan.h
@@ -105,11 +105,11 @@
         SkOpPtT* start1 = s1->fT < e1->fT ? s1 : e1;
         SkOpPtT* start2 = s2->fT < e2->fT ? s2 : e2;
         *sOut = between(s1->fT, start2->fT, e1->fT) ? start2
-                : between(s2->fT, start1->fT, e2->fT) ? start1 : NULL;
+                : between(s2->fT, start1->fT, e2->fT) ? start1 : nullptr;
         SkOpPtT* end1 = s1->fT < e1->fT ? e1 : s1;
         SkOpPtT* end2 = s2->fT < e2->fT ? e2 : s2;
         *eOut = between(s1->fT, end2->fT, e1->fT) ? end2
-                : between(s2->fT, end1->fT, e2->fT) ? end1 : NULL;
+                : between(s2->fT, end1->fT, e2->fT) ? end1 : nullptr;
         if (*sOut == *eOut) {
             SkASSERT(start1->fT >= end2->fT || start2->fT >= end1->fT);
             return false;
@@ -341,11 +341,11 @@
     }
 
     SkOpSpan* upCastable() {
-        return final() ? NULL : upCast();
+        return final() ? nullptr : upCast();
     }
 
     const SkOpSpan* upCastable() const {
-        return final() ? NULL : upCast();
+        return final() ? nullptr : upCast();
     }
 
 private:
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp
index c53f458..58bcacd 100644
--- a/src/pathops/SkPathOpsCommon.cpp
+++ b/src/pathops/SkPathOpsCommon.cpp
@@ -18,7 +18,7 @@
     const SkOpAngle* angle = segment->spanToAngle(start, end);
     if (!angle) {
         *windingPtr = SK_MinS32;
-        return NULL;
+        return nullptr;
     }
     bool computeWinding = false;
     const SkOpAngle* firstAngle = angle;
@@ -70,7 +70,7 @@
             return result;
         }
     } while ((contour = contour->next()));
-    return NULL;
+    return nullptr;
 }
 
 SkOpSegment* FindChase(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** startPtr,
@@ -81,7 +81,7 @@
         SkOpSegment* segment = span->segment();
         *startPtr = span->ptT()->next()->span();
         bool done = true;
-        *endPtr = NULL;
+        *endPtr = nullptr;
         if (SkOpAngle* last = segment->activeAngle(*startPtr, startPtr, endPtr, &done)) {
             *startPtr = last->start();
             *endPtr = last->end();
@@ -107,7 +107,7 @@
             segment = angle->segment();
             sumWinding = segment->updateWindingReverse(angle);
         }
-        SkOpSegment* first = NULL;
+        SkOpSegment* first = nullptr;
         const SkOpAngle* firstAngle = angle;
         while ((angle = angle->next()) != firstAngle) {
             segment = angle->segment();
@@ -138,7 +138,7 @@
             return first;
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 #if DEBUG_ACTIVE_SPANS
@@ -175,7 +175,7 @@
         contour->setNext(next);
         contour = next;
     }
-    contour->setNext(NULL);
+    contour->setNext(nullptr);
     return true;
 }
 
@@ -198,7 +198,7 @@
 void Assemble(const SkPathWriter& path, SkPathWriter* simple) {
     SkChunkAlloc allocator(4096);  // FIXME: constant-ize, tune
     SkOpContourHead contour;
-    SkOpGlobalState globalState(NULL, &contour  SkDEBUGPARAMS(NULL));
+    SkOpGlobalState globalState(nullptr, &contour  SkDEBUGPARAMS(nullptr));
 #if DEBUG_SHOW_TEST_NAME
     SkDebugf("</div>\n");
 #endif
diff --git a/src/pathops/SkPathOpsCurve.h b/src/pathops/SkPathOpsCurve.h
index c830e66..97e20be 100644
--- a/src/pathops/SkPathOpsCurve.h
+++ b/src/pathops/SkPathOpsCurve.h
@@ -108,7 +108,7 @@
 }
 
 static SkDPoint (* const CurveDPointAtT[])(const SkPoint[], SkScalar , double ) = {
-    NULL,
+    nullptr,
     dline_xy_at_t,
     dquad_xy_at_t,
     dconic_xy_at_t,
@@ -132,7 +132,7 @@
 }
 
 static SkPoint (* const CurvePointAtT[])(const SkPoint[], SkScalar , double ) = {
-    NULL,
+    nullptr,
     fline_xy_at_t,
     fquad_xy_at_t,
     fconic_xy_at_t,
@@ -164,7 +164,7 @@
 }
 
 static SkDVector (* const CurveDSlopeAtT[])(const SkPoint[], SkScalar , double ) = {
-    NULL,
+    nullptr,
     dline_dxdy_at_t,
     dquad_dxdy_at_t,
     dconic_dxdy_at_t,
@@ -188,7 +188,7 @@
 }
 
 static SkVector (* const CurveSlopeAtT[])(const SkPoint[], SkScalar , double ) = {
-    NULL,
+    nullptr,
     fline_dxdy_at_t,
     fquad_dxdy_at_t,
     fconic_dxdy_at_t,
@@ -225,7 +225,7 @@
 }
 
 static bool (* const CurveIsVertical[])(const SkPoint[], SkScalar , double , double) = {
-    NULL,
+    nullptr,
     line_is_vertical,
     quad_is_vertical,
     conic_is_vertical,
@@ -262,7 +262,7 @@
 
 static void (* const CurveIntersectRay[])(const SkPoint[] , SkScalar , const SkDLine& ,
         SkIntersections* ) = {
-    NULL,
+    nullptr,
     line_intersect_ray,
     quad_intersect_ray,
     conic_intersect_ray,
@@ -312,8 +312,8 @@
 }
 
 static int (* const CurveIntercept[])(const SkPoint[] , SkScalar , SkScalar , double* ) = {
-    NULL,
-    NULL,
+    nullptr,
+    nullptr,
     line_intercept_h,
     line_intercept_v,
     quad_intercept_h,
diff --git a/src/pathops/SkPathOpsDebug.cpp b/src/pathops/SkPathOpsDebug.cpp
index 813f237..141041a 100644
--- a/src/pathops/SkPathOpsDebug.cpp
+++ b/src/pathops/SkPathOpsDebug.cpp
@@ -163,7 +163,7 @@
 #include "SkOpSegment.h"
 
 SkOpAngle* SkOpSegment::debugLastAngle() {
-    SkOpAngle* result = NULL;
+    SkOpAngle* result = nullptr;
     SkOpSpan* span = this->head();
     do {
         if (span->toAngle()) {
@@ -414,7 +414,7 @@
 #if DEBUG_VALIDATE
     const SkOpSpanBase* span = &fHead;
     double lastT = -1;
-    const SkOpSpanBase* prev = NULL;
+    const SkOpSpanBase* prev = nullptr;
     int count = 0;
     int done = 0;
     do {
@@ -645,7 +645,7 @@
     SkPath::RawIter iter(path);
 #define SUPPORT_RECT_CONTOUR_DETECTION 0
 #if SUPPORT_RECT_CONTOUR_DETECTION
-    int rectCount = path.isRectContours() ? path.rectContours(NULL, NULL) : 0;
+    int rectCount = path.isRectContours() ? path.rectContours(nullptr, nullptr) : 0;
     if (rectCount > 0) {
         SkTDArray<SkRect> rects;
         SkTDArray<SkPath::Direction> directions;
diff --git a/src/pathops/SkPathOpsOp.cpp b/src/pathops/SkPathOpsOp.cpp
index 12a9578..be7fae7 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -19,7 +19,7 @@
         *startPtr = span->ptT()->prev()->span();
         SkOpSegment* segment = (*startPtr)->segment();
         bool done = true;
-        *endPtr = NULL;
+        *endPtr = nullptr;
         if (SkOpAngle* last = segment->activeAngle(*startPtr, startPtr, endPtr, &done)) {
             *startPtr = last->start();
             *endPtr = last->end();
@@ -48,7 +48,7 @@
                 SkTSwap<int>(sumMiWinding, sumSuWinding);
             }
         }
-        SkOpSegment* first = NULL;
+        SkOpSegment* first = nullptr;
         const SkOpAngle* firstAngle = angle;
         while ((angle = angle->next()) != firstAngle) {
             segment = angle->segment();
@@ -81,7 +81,7 @@
             return first;
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 static bool bridgeOp(SkOpContourHead* contourList, const SkPathOp op,
@@ -304,5 +304,5 @@
 }
 
 bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
-    return OpDebug(one, two, op, result, true  SkDEBUGPARAMS(NULL));
+    return OpDebug(one, two, op, result, true  SkDEBUGPARAMS(nullptr));
 }
diff --git a/src/pathops/SkPathOpsSimplify.cpp b/src/pathops/SkPathOpsSimplify.cpp
index 8c07653..14fde4f 100644
--- a/src/pathops/SkPathOpsSimplify.cpp
+++ b/src/pathops/SkPathOpsSimplify.cpp
@@ -167,7 +167,7 @@
     SkOpCoincidence coincidence;
     SkOpContour contour;
     SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour);
-    SkOpGlobalState globalState(&coincidence, contourList  SkDEBUGPARAMS(NULL));
+    SkOpGlobalState globalState(&coincidence, contourList  SkDEBUGPARAMS(nullptr));
 #if DEBUG_SORT
     SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault;
 #endif
diff --git a/src/pathops/SkPathOpsTSect.h b/src/pathops/SkPathOpsTSect.h
index 6ea01be..e8a0fd4 100644
--- a/src/pathops/SkPathOpsTSect.h
+++ b/src/pathops/SkPathOpsTSect.h
@@ -112,7 +112,7 @@
     void initBounds(const TCurve& );
 
     bool isBounded() const {
-        return fBounded != NULL;
+        return fBounded != nullptr;
     }
 
     bool linearsIntersect(SkTSpan<OppCurve, TCurve>* span);
@@ -138,7 +138,7 @@
     bool removeBounded(const SkTSpan<OppCurve, TCurve>* opp);
 
     void reset() {
-        fBounded = NULL;
+        fBounded = nullptr;
     }
 
     void resetBounds(const TCurve& curve) {
@@ -207,7 +207,7 @@
     bool debugHasBounded(const SkTSpan<OppCurve, TCurve>* ) const;
 
     const SkTSect<OppCurve, TCurve>* debugOpp() const {
-        return SkDEBUGRELEASE(fOppSect, NULL);
+        return SkDEBUGRELEASE(fOppSect, nullptr);
     }
 
     const SkTSpan<TCurve, OppCurve>* debugSpan(int id) const;
@@ -452,7 +452,7 @@
 
 template<typename TCurve, typename OppCurve>
 const SkTSect<OppCurve, TCurve>* SkTSpan<TCurve, OppCurve>::debugOpp() const {
-    return SkDEBUGRELEASE(fDebugSect->debugOpp(), NULL);
+    return SkDEBUGRELEASE(fDebugSect->debugOpp(), nullptr);
 }
 
 template<typename TCurve, typename OppCurve>
@@ -466,7 +466,7 @@
         }
         bounded = bounded->fNext;
     }
-    return NULL;
+    return nullptr;
 }
 
 // returns 0 if no hull intersection
@@ -520,10 +520,10 @@
 
 template<typename TCurve, typename OppCurve>
 void SkTSpan<TCurve, OppCurve>::init(const TCurve& c) {
-    fPrev = fNext = NULL;
+    fPrev = fNext = nullptr;
     fStartT = 0;
     fEndT = 1;
-    fBounded = NULL;
+    fBounded = nullptr;
     resetBounds(c);
 }
 
@@ -656,7 +656,7 @@
         }
         bounded = bounded->fNext;
     }
-    return NULL;
+    return nullptr;
 }
 
 template<typename TCurve, typename OppCurve>
@@ -692,7 +692,7 @@
         }
     }
     SkTSpanBounded<OppCurve, TCurve>* bounded = fBounded;
-    SkTSpanBounded<OppCurve, TCurve>* prev = NULL;
+    SkTSpanBounded<OppCurve, TCurve>* prev = nullptr;
     while (bounded) {
         SkTSpanBounded<OppCurve, TCurve>* boundedNext = bounded->fNext;
         if (opp == bounded->fBounded) {
@@ -701,7 +701,7 @@
                 return false;
             } else {
                 fBounded = boundedNext;
-                return fBounded == NULL;
+                return fBounded == nullptr;
             }
         }
         prev = bounded;
@@ -734,7 +734,7 @@
         fNext->fPrev = this;
     }
     SkTSpanBounded<OppCurve, TCurve>* bounded = work->fBounded;
-    fBounded = NULL;
+    fBounded = nullptr;
     while (bounded) {
         this->addBounded(bounded->fBounded, heap);
         bounded = bounded->fNext;
@@ -750,9 +750,9 @@
 template<typename TCurve, typename OppCurve>
 void SkTSpan<TCurve, OppCurve>::validate() const {
 #if DEBUG_T_SECT
-    SkASSERT(fNext == NULL || fNext != fPrev);
-    SkASSERT(fNext == NULL || this == fNext->fPrev);
-    SkASSERT(fPrev == NULL || this == fPrev->fNext);
+    SkASSERT(fNext == nullptr || fNext != fPrev);
+    SkASSERT(fNext == nullptr || this == fNext->fPrev);
+    SkASSERT(fPrev == nullptr || this == fPrev->fNext);
     SkASSERT(fBounds.width() || fBounds.height() || fCollapsed);
     SkASSERT(fBoundsMax == SkTMax(fBounds.width(), fBounds.height()));
     SkASSERT(0 <= fStartT);
@@ -810,8 +810,8 @@
 SkTSect<TCurve, OppCurve>::SkTSect(const TCurve& c PATH_OPS_DEBUG_T_SECT_PARAMS(int id))
     : fCurve(c)
     , fHeap(sizeof(SkTSpan<TCurve, OppCurve>) * 4)
-    , fCoincident(NULL)
-    , fDeleted(NULL)
+    , fCoincident(nullptr)
+    , fDeleted(nullptr)
     , fActiveCount(0)
     PATH_OPS_DEBUG_T_SECT_PARAMS(fID(id))
     PATH_OPS_DEBUG_T_SECT_PARAMS(fDebugCount(0))
@@ -831,7 +831,7 @@
     } else {
         result = new (fHeap.allocThrow(sizeof(SkTSpan<TCurve, OppCurve>)))(
                 SkTSpan<TCurve, OppCurve>);
-        result->fBounded = NULL;
+        result->fBounded = nullptr;
 #if DEBUG_T_SECT
         ++fDebugAllocatedCount;
 #endif
@@ -973,7 +973,7 @@
         SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) {
     const OppCurve& opp = sect2->fCurve;
     SkTSpan<TCurve, OppCurve>* work = first;
-    SkTSpan<TCurve, OppCurve>* prior = NULL;
+    SkTSpan<TCurve, OppCurve>* prior = nullptr;
     do {
         if (!work->fHasPerp && !work->fCollapsed) {
             if (prior) {
@@ -1061,7 +1061,7 @@
         SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>* last) {
     first = findCoincidentRun(first, &last);
     if (!first) {
-        return NULL;
+        return nullptr;
     }
     // march outwards to find limit of coincidence from here to previous and next spans
     double startT = first->fStartT;
@@ -1146,15 +1146,15 @@
     }
     this->validate();
     sect2->validate();
-    return last && !last->fDeleted ? last : NULL;
+    return last && !last->fDeleted ? last : nullptr;
 }
 
 template<typename TCurve, typename OppCurve>
 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::findCoincidentRun(
         SkTSpan<TCurve, OppCurve>* first, SkTSpan<TCurve, OppCurve>** lastPtr) {
     SkTSpan<TCurve, OppCurve>* work = first;
-    SkTSpan<TCurve, OppCurve>* lastCandidate = NULL;
-    first = NULL;
+    SkTSpan<TCurve, OppCurve>* lastCandidate = nullptr;
+    first = nullptr;
     // find the first fully coincident span
     do {
         if (work->fCoinStart.isCoincident()) {
@@ -1174,7 +1174,7 @@
             *lastPtr = lastCandidate;
             return first;
         } else {
-            lastCandidate = NULL;
+            lastCandidate = nullptr;
             SkASSERT(!first);
         }
         if (work == *lastPtr) {
@@ -1404,7 +1404,7 @@
     double smallLimit = 0;
     do {
         // find the smallest unprocessed span
-        SkTSpan<TCurve, OppCurve>* smaller = NULL;
+        SkTSpan<TCurve, OppCurve>* smaller = nullptr;
         SkTSpan<TCurve, OppCurve>* test = fCoincident;
         do {
             if (test->fStartT < smallLimit) {
@@ -1420,9 +1420,9 @@
         }
         smallLimit = smaller->fEndT;
         // find next larger span
-        SkTSpan<TCurve, OppCurve>* prior = NULL;
-        SkTSpan<TCurve, OppCurve>* larger = NULL;
-        SkTSpan<TCurve, OppCurve>* largerPrior = NULL;
+        SkTSpan<TCurve, OppCurve>* prior = nullptr;
+        SkTSpan<TCurve, OppCurve>* larger = nullptr;
+        SkTSpan<TCurve, OppCurve>* largerPrior = nullptr;
         test = fCoincident;
         do {
             if (test->fStartT < smaller->fEndT) {
@@ -1458,7 +1458,7 @@
 template<typename TCurve, typename OppCurve>
 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::prev(
         SkTSpan<TCurve, OppCurve>* span) const {
-    SkTSpan<TCurve, OppCurve>* result = NULL;
+    SkTSpan<TCurve, OppCurve>* result = nullptr;
     SkTSpan<TCurve, OppCurve>* test = fHead;
     while (span != test) {
         result = test;
@@ -1588,13 +1588,13 @@
 SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::spanAtT(double t,
         SkTSpan<TCurve, OppCurve>** priorSpan) {
     SkTSpan<TCurve, OppCurve>* test = fHead;
-    SkTSpan<TCurve, OppCurve>* prev = NULL;
+    SkTSpan<TCurve, OppCurve>* prev = nullptr;
     while (test && test->fEndT < t) {
         prev = test;
         test = test->fNext;
     }
     *priorSpan = prev;
-    return test && test->fStartT <= t ? test : NULL;
+    return test && test->fStartT <= t ? test : nullptr;
 }
 
 template<typename TCurve, typename OppCurve>
@@ -1654,7 +1654,7 @@
     } else {
         fHead = next;
         if (next) {
-            next->fPrev = NULL;
+            next->fPrev = nullptr;
         }
     }
 }
@@ -1668,7 +1668,7 @@
     do {
         deleteSpan |= test->removeAllBounded();
     } while ((test = test->fNext) != final);
-    first->fBounded = NULL;
+    first->fBounded = nullptr;
     first->addBounded(oppFirst, &fHeap);
     // cannot call validate until remove span range is called
     return deleteSpan;
@@ -1688,7 +1688,7 @@
             SkASSERT(span->fStartT >= last);
             SkDEBUGCODE(last = span->fEndT);
             ++count;
-        } while ((span = span->fNext) != NULL);
+        } while ((span = span->fNext) != nullptr);
     }
     SkASSERT(count == fActiveCount);
     SkASSERT(fActiveCount <= fDebugAllocatedCount);
@@ -1716,7 +1716,7 @@
     const SkTSpan<TCurve, OppCurve>* span = fHead;
     do {
         span->validateBounded();
-    } while ((span = span->fNext) != NULL);
+    } while ((span = span->fNext) != nullptr);
 #endif
 }
 
@@ -1823,8 +1823,8 @@
     
     void reset() {
         fClosest = FLT_MAX;
-        SkDEBUGCODE(fC1Span = NULL);
-        SkDEBUGCODE(fC2Span = NULL);
+        SkDEBUGCODE(fC1Span = nullptr);
+        SkDEBUGCODE(fC2Span = nullptr);
         SkDEBUGCODE(fC1Index = fC2Index = -1);
     }
 
diff --git a/src/pathops/SkPathOpsTightBounds.cpp b/src/pathops/SkPathOpsTightBounds.cpp
index 7eb72a9..ac5d6aa 100644
--- a/src/pathops/SkPathOpsTightBounds.cpp
+++ b/src/pathops/SkPathOpsTightBounds.cpp
@@ -11,7 +11,7 @@
     SkChunkAlloc allocator(4096);  // FIXME: constant-ize, tune
     SkOpContour contour;
     SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour);
-    SkOpGlobalState globalState(NULL, contourList  SkDEBUGPARAMS(NULL));
+    SkOpGlobalState globalState(nullptr, contourList  SkDEBUGPARAMS(nullptr));
     // turn path into list of segments
     SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState);
     if (!builder.finish(&allocator)) {
diff --git a/src/pathops/SkPathOpsWinding.cpp b/src/pathops/SkPathOpsWinding.cpp
index 03efdac..3061ea3 100644
--- a/src/pathops/SkPathOpsWinding.cpp
+++ b/src/pathops/SkPathOpsWinding.cpp
@@ -82,7 +82,7 @@
 
 struct SkOpRayHit {
     SkOpRayDir makeTestBase(SkOpSpan* span, double t) {
-        fNext = NULL;
+        fNext = nullptr;
         fSpan = span;
         fT = span->t() * (1 - t) + span->next()->t() * t;
         SkOpSegment* segment = span->segment();
@@ -191,13 +191,13 @@
     do {
         next = span->next();
         if (approximately_equal(tHit, next->t())) {
-            return NULL;
+            return nullptr;
         } 
         if (tHit < next->t()) {
             return span;
         }
     } while (!next->final() && (span = next->upCast()));
-    return NULL;
+    return nullptr;
 }
 
 static bool hit_compare_x(const SkOpRayHit* a, const SkOpRayHit* b) {
@@ -266,7 +266,7 @@
     for (int index = 0; index < count; ++index) {
         hit = sorted[index];
         SkOpSpan* span = hit->fSpan;
-        SkOpSegment* hitSegment = span ? span->segment() : NULL;
+        SkOpSegment* hitSegment = span ? span->segment() : nullptr;
         bool operand = span ? hitSegment->operand() : false;
         bool ccw = ccw_dxdy(hit->fSlope, dir);
         SkDebugf("%s [%d] valid=%d operand=%d span=%d ccw=%d ", __FUNCTION__, index,
@@ -278,7 +278,7 @@
                 hit->fPt.fX, hit->fPt.fY, hit->fSlope.fX, hit->fSlope.fY);
     }
 #endif
-    const SkPoint* last = NULL;
+    const SkPoint* last = nullptr;
     int wind = 0;
     int oppWind = 0;
     for (int index = 0; index < count; ++index) {
@@ -345,8 +345,8 @@
             if (this->globalState()->phase() == SkOpGlobalState::kFixWinding) {
                 hitSegment->contour()->setCcw(ccw);
             } else {
-                (void) hitSegment->markAndChaseWinding(span, span->next(), windSum, oppSum, NULL);
-                (void) hitSegment->markAndChaseWinding(span->next(), span, windSum, oppSum, NULL);
+                (void) hitSegment->markAndChaseWinding(span, span->next(), windSum, oppSum, nullptr);
+                (void) hitSegment->markAndChaseWinding(span->next(), span, windSum, oppSum, nullptr);
             }
         }
         if (operand) {
@@ -373,7 +373,7 @@
             return span;
         }
     } while (!next->final() && (span = next->upCast()));
-    return NULL;
+    return nullptr;
 }
 
 SkOpSpan* SkOpContour::findSortableTop(SkOpContour* contourHead) {
@@ -387,7 +387,7 @@
             return result;
         }
     } while ((testSegment = testSegment->next()));
-    return NULL;
+    return nullptr;
 }
 
 SkOpSpan* FindSortableTop(SkOpContourHead* contourHead) {
@@ -403,5 +403,5 @@
             }
         } while ((contour = contour->next()));
     }
-    return NULL;
+    return nullptr;
 }