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

Unified Diff: src/gpu/GrReducedClip.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrRedBlackTree.h ('k') | src/gpu/GrRenderTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrReducedClip.cpp
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 6ad9cc6d8b84d1e3632e4bd262709b3b759e3437..2083af907ecc18a806fecfc0b6cf85ca18d80dc5 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -65,21 +65,21 @@ void ReduceClipStack(const SkClipStack& stack,
SkRect isectRect;
if (stackBounds.contains(scalarQueryBounds)) {
*initialState = kAllIn_InitialState;
- if (NULL != tighterBounds) {
+ if (tighterBounds) {
*tighterBounds = queryBounds;
}
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = false;
}
} else if (isectRect.intersect(stackBounds, scalarQueryBounds)) {
// If the caller asked for tighter integer bounds we may be able to
// return kAllIn and give the bounds with no elements
- if (NULL != tighterBounds) {
+ if (tighterBounds) {
isectRect.roundOut(tighterBounds);
SkRect scalarTighterBounds = SkRect::Make(*tighterBounds);
if (scalarTighterBounds == isectRect) {
// the round-out didn't add any area outside the clip rect.
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = false;
}
*initialState = kAllIn_InitialState;
@@ -91,12 +91,12 @@ void ReduceClipStack(const SkClipStack& stack,
SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart);
bool doAA = iter.prev()->isAA();
SkNEW_INSERT_AT_LLIST_HEAD(result, Element, (isectRect, SkRegion::kReplace_Op, doAA));
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = doAA;
}
} else {
*initialState = kAllOut_InitialState;
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = false;
}
}
@@ -105,12 +105,12 @@ void ReduceClipStack(const SkClipStack& stack,
if (SkClipStack::kNormal_BoundsType == stackBoundsType) {
if (!SkRect::Intersects(stackBounds, scalarQueryBounds)) {
*initialState = kAllOut_InitialState;
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = false;
}
return;
}
- if (NULL != tighterBounds) {
+ if (tighterBounds) {
SkIRect stackIBounds;
stackBounds.roundOut(&stackIBounds);
tighterBounds->intersect(queryBounds, stackIBounds);
@@ -119,12 +119,12 @@ void ReduceClipStack(const SkClipStack& stack,
} else {
if (stackBounds.contains(scalarQueryBounds)) {
*initialState = kAllOut_InitialState;
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = false;
}
return;
}
- if (NULL != tighterBounds) {
+ if (tighterBounds) {
*tighterBounds = queryBounds;
}
}
@@ -367,7 +367,7 @@ void reduced_stack_walker(const SkClipStack& stack,
result->reset();
} else {
Element* element = result->headIter().get();
- while (NULL != element) {
+ while (element) {
bool skippable = false;
switch (element->getOp()) {
case SkRegion::kDifference_Op:
@@ -435,7 +435,7 @@ void reduced_stack_walker(const SkClipStack& stack,
}
}
}
- if (NULL != requiresAA) {
+ if (requiresAA) {
*requiresAA = numAAElements > 0;
}
« no previous file with comments | « src/gpu/GrRedBlackTree.h ('k') | src/gpu/GrRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698