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

Unified Diff: src/core/SkClipStack.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 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/core/SkChunkAlloc.cpp ('k') | src/core/SkColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkClipStack.cpp
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index 9541cc613f4207d2028459cfbabcb3fb38e23bed..f54d57fd0ba5f9e8cae84155b43b33af09175ce9 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -395,7 +395,7 @@ void SkClipStack::Element::updateBoundAndGenID(const Element* prior) {
fFiniteBoundType = kNormal_BoundsType;
if (SkRegion::kReplace_Op == fOp ||
- (SkRegion::kIntersect_Op == fOp && NULL == prior) ||
+ (SkRegion::kIntersect_Op == fOp && nullptr == prior) ||
(SkRegion::kIntersect_Op == fOp && prior->fIsIntersectionOfRects &&
prior->rectRectIntersectAllowed(this->getRect(), fDoAA))) {
fIsIntersectionOfRects = true;
@@ -431,7 +431,7 @@ void SkClipStack::Element::updateBoundAndGenID(const Element* prior) {
SkRect prevFinite;
SkClipStack::BoundsType prevType;
- if (NULL == prior) {
+ if (nullptr == prior) {
// no prior clip means the entire plane is writable
prevFinite.setEmpty(); // there are no pixels that cannot be drawn to
prevType = kInsideOut_BoundsType;
@@ -529,7 +529,7 @@ SkClipStack& SkClipStack::operator=(const SkClipStack& b) {
fSaveCount = b.fSaveCount;
SkDeque::F2BIter recIter(b.fDeque);
for (const Element* element = (const Element*)recIter.next();
- element != NULL;
+ element != nullptr;
element = (const Element*)recIter.next()) {
new (fDeque.push_back()) Element(*element);
}
@@ -550,14 +550,14 @@ bool SkClipStack::operator==(const SkClipStack& b) const {
const Element* myElement = (const Element*)myIter.next();
const Element* bElement = (const Element*)bIter.next();
- while (myElement != NULL && bElement != NULL) {
+ while (myElement != nullptr && bElement != nullptr) {
if (*myElement != *bElement) {
return false;
}
myElement = (const Element*)myIter.next();
bElement = (const Element*)bIter.next();
}
- return myElement == NULL && bElement == NULL;
+ return myElement == nullptr && bElement == nullptr;
}
void SkClipStack::reset() {
@@ -599,7 +599,7 @@ void SkClipStack::getBounds(SkRect* canvFiniteBound,
Element* element = (Element*)fDeque.back();
- if (NULL == element) {
+ if (nullptr == element) {
// the clip is wide open - the infinite plane w/ no pixels un-writeable
canvFiniteBound->setEmpty();
*boundType = kInsideOut_BoundsType;
@@ -620,7 +620,7 @@ bool SkClipStack::quickContains(const SkRect& rect) const {
Iter iter(*this, Iter::kTop_IterStart);
const Element* element = iter.prev();
- while (element != NULL) {
+ while (element != nullptr) {
if (SkRegion::kIntersect_Op != element->getOp() && SkRegion::kReplace_Op != element->getOp())
return false;
if (element->isInverseFilled()) {
@@ -747,7 +747,7 @@ bool SkClipStack::isWideOpen() const {
///////////////////////////////////////////////////////////////////////////////
-SkClipStack::Iter::Iter() : fStack(NULL) {
+SkClipStack::Iter::Iter() : fStack(nullptr) {
}
SkClipStack::Iter::Iter(const SkClipStack& stack, IterStart startLoc)
@@ -765,13 +765,13 @@ const SkClipStack::Element* SkClipStack::Iter::prev() {
const SkClipStack::Element* SkClipStack::Iter::skipToTopmost(SkRegion::Op op) {
- if (NULL == fStack) {
- return NULL;
+ if (nullptr == fStack) {
+ return nullptr;
}
fIter.reset(fStack->fDeque, SkDeque::Iter::kBack_IterStart);
- const SkClipStack::Element* element = NULL;
+ const SkClipStack::Element* element = nullptr;
for (element = (const SkClipStack::Element*) fIter.prev();
element;
@@ -784,7 +784,7 @@ const SkClipStack::Element* SkClipStack::Iter::skipToTopmost(SkRegion::Op op) {
// return on the next "next" or "prev" call) the element
// in front of it in the deque. Bump the iterator forward a
// step so we get the expected result.
- if (NULL == fIter.next()) {
+ if (nullptr == fIter.next()) {
// The reverse iterator has run off the front of the deque
// (i.e., the "op" clip is the first clip) and can't
// recover. Reset the iterator to start at the front.
@@ -794,7 +794,7 @@ const SkClipStack::Element* SkClipStack::Iter::skipToTopmost(SkRegion::Op op) {
}
}
- if (NULL == element) {
+ if (nullptr == element) {
// There were no "op" clips
fIter.reset(fStack->fDeque, SkDeque::Iter::kFront_IterStart);
}
@@ -899,7 +899,7 @@ void SkClipStack::Element::dump() const {
SkDebugf("\n");
break;
case kPath_Type:
- this->getPath().dump(NULL, true, false);
+ this->getPath().dump(nullptr, true, false);
break;
}
}
« no previous file with comments | « src/core/SkChunkAlloc.cpp ('k') | src/core/SkColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698