aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrReducedClip.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-09-05 13:34:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-05 13:34:00 -0700
commit49f085dddff10473b6ebf832a974288300224e60 (patch)
tree308a3cac5e1fb053c9e27e7d07213d72eaa05409 /src/gpu/GrReducedClip.cpp
parent7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff)
"NULL !=" = NULL
R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'src/gpu/GrReducedClip.cpp')
-rw-r--r--src/gpu/GrReducedClip.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 6ad9cc6d8b..2083af907e 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;
}