| 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;
|
| }
|
| }
|
|
|