aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients
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/effects/gradients
parent7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff)
"NULL !=" = NULL
R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'src/effects/gradients')
-rw-r--r--src/effects/gradients/SkGradientShader.cpp4
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp2
-rw-r--r--src/effects/gradients/SkRadialGradient.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointRadialGradient.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 3ac363568c..23c473fa9c 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1150,7 +1150,7 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx,
desc.fContext = ctx;
desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.info());
fAtlas = GrTextureStripAtlas::GetAtlas(desc);
- SkASSERT(NULL != fAtlas);
+ SkASSERT(fAtlas);
// We always filter the gradient table. Each table is one row of a texture, always y-clamp.
GrTextureParams params;
@@ -1239,7 +1239,7 @@ int GrGradientEffect::RandomGradientParams(SkRandom* random,
SkScalar stop = 0.f;
for (int i = 0; i < outColors; ++i) {
colors[i] = random->nextU();
- if (NULL != *stops) {
+ if (*stops) {
(*stops)[i] = stop;
stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - stop) : 1.f;
}
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 551afaab02..b26d60626b 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -569,7 +569,7 @@ void GrGLLinearGradient::emitCode(GrGLProgramBuilder* builder,
bool SkLinearGradient::asNewEffect(GrContext* context, const SkPaint& paint,
const SkMatrix* localMatrix, GrColor* paintColor,
GrEffect** effect) const {
- SkASSERT(NULL != context);
+ SkASSERT(context);
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index aeae24a0af..895dbb99ca 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -579,7 +579,7 @@ void GrGLRadialGradient::emitCode(GrGLProgramBuilder* builder,
bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint,
const SkMatrix* localMatrix, GrColor* paintColor,
GrEffect** effect) const {
- SkASSERT(NULL != context);
+ SkASSERT(context);
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 9284e7cb09..0ecad3a051 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -423,7 +423,7 @@ void SkTwoPointConicalGradient::flatten(SkWriteBuffer& buffer) const {
bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& paint,
const SkMatrix* localMatrix, GrColor* paintColor,
GrEffect** effect) const {
- SkASSERT(NULL != context);
+ SkASSERT(context);
SkASSERT(fPtsToUnit.isIdentity());
*effect = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMatrix);
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index bb5ec04bfd..75b1e79d7a 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -687,7 +687,7 @@ void GrGLRadial2Gradient::GenKey(const GrDrawEffect& drawEffect,
bool SkTwoPointRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint,
const SkMatrix* localMatrix, GrColor* paintColor,
GrEffect** effect) const {
- SkASSERT(NULL != context);
+ SkASSERT(context);
// invert the localM, translate to center1 (fPtsToUni), rotate so center2 is on x axis.
SkMatrix matrix;