diff options
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkArithmeticMode.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkAvoidXfermode.cpp | 4 | ||||
-rwxr-xr-x | src/effects/SkColorFilterImageFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkColorMatrixFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkDashPathEffect.cpp | 4 | ||||
-rw-r--r-- | src/effects/SkGpuBlurUtils.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkLayerDrawLooper.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkMagnifierImageFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkMorphologyImageFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkPerlinNoiseShader.cpp | 8 | ||||
-rw-r--r-- | src/effects/SkPictureImageFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkTableColorFilter.cpp | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientShader.cpp | 4 | ||||
-rw-r--r-- | src/effects/gradients/SkLinearGradient.cpp | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkRadialGradient.cpp | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkTwoPointConicalGradient.cpp | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkTwoPointRadialGradient.cpp | 2 |
17 files changed, 23 insertions, 23 deletions
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp index be636c5bbf..22f464cb49 100644 --- a/src/effects/SkArithmeticMode.cpp +++ b/src/effects/SkArithmeticMode.cpp @@ -379,7 +379,7 @@ void GrGLArithmeticEffect::emitCode(GrGLProgramBuilder* builder, dstColor = fsBuilder->dstColor(); } - SkASSERT(NULL != dstColor); + SkASSERT(dstColor); fKUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, kVec4f_GrSLType, "k"); const char* kUni = builder->getUniformCStr(fKUni); diff --git a/src/effects/SkAvoidXfermode.cpp b/src/effects/SkAvoidXfermode.cpp index aae6ba5f11..b596bfdb73 100644 --- a/src/effects/SkAvoidXfermode.cpp +++ b/src/effects/SkAvoidXfermode.cpp @@ -108,7 +108,7 @@ void SkAvoidXfermode::xfer32(SkPMColor dst[], const SkPMColor src[], int count, SkASSERT(d <= 256); if (d > 0) { - if (NULL != aa) { + if (aa) { d = SkAlphaMul(d, Accurate255To256(*aa++)); if (0 == d) { continue; @@ -157,7 +157,7 @@ void SkAvoidXfermode::xfer16(uint16_t dst[], const SkPMColor src[], int count, SkASSERT(d <= 32); if (d > 0) { - if (NULL != aa) { + if (aa) { d = SkAlphaMul(d, Accurate255To256(*aa++)); if (0 == d) { continue; diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp index 7c3e9e884e..2a8df5c672 100755 --- a/src/effects/SkColorFilterImageFilter.cpp +++ b/src/effects/SkColorFilterImageFilter.cpp @@ -64,7 +64,7 @@ SkColorFilterImageFilter* SkColorFilterImageFilter::Create(SkColorFilter* cf, SkColorFilter* inputColorFilter; if (input && cf->asColorMatrix(colorMatrix) && input->asColorFilter(&inputColorFilter) - && (NULL != inputColorFilter)) { + && (inputColorFilter)) { SkAutoUnref autoUnref(inputColorFilter); if (inputColorFilter->asColorMatrix(inputMatrix) && !matrix_needs_clamping(inputMatrix)) { SkScalar combinedMatrix[20]; diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index beed67efcf..566704849b 100644 --- a/src/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp @@ -186,7 +186,7 @@ void SkColorMatrixFilter::initState(const SkScalar* SK_RESTRICT src) { analyze the array, so we don't miss the case where the caller has zeros which could make us accidentally take the General or Add case. */ - if (NULL != fProc) { + if (fProc) { int32_t add = 1 << (fState.fShift - 1); array[4] += add; array[9] += add; diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index 66462af85b..f9a56d0ff4 100644 --- a/src/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp @@ -104,7 +104,7 @@ bool SkDashPathEffect::asPoints(PointData* results, return false; } - if (NULL != results) { + if (results) { results->fFlags = 0; SkScalar clampedInitialDashLength = SkMinScalar(length, fInitialDashLength); @@ -229,7 +229,7 @@ bool SkDashPathEffect::asPoints(PointData* results, SkPathEffect::DashType SkDashPathEffect::asADash(DashInfo* info) const { if (info) { - if (info->fCount >= fCount && NULL != info->fIntervals) { + if (info->fCount >= fCount && info->fIntervals) { memcpy(info->fIntervals, fIntervals, fCount * sizeof(SkScalar)); } info->fCount = fCount; diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp index aa7f9952f9..a9a53f2acf 100644 --- a/src/effects/SkGpuBlurUtils.cpp +++ b/src/effects/SkGpuBlurUtils.cpp @@ -146,7 +146,7 @@ GrTexture* GaussianBlur(GrContext* context, bool cropToRect, float sigmaX, float sigmaY) { - SkASSERT(NULL != context); + SkASSERT(context); GrContext::AutoRenderTarget art(context); diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp index 19525eca51..30709c4f1c 100644 --- a/src/effects/SkLayerDrawLooper.cpp +++ b/src/effects/SkLayerDrawLooper.cpp @@ -337,7 +337,7 @@ SkPaint* SkLayerDrawLooper::Builder::addLayerOnTop(const LayerInfo& info) { if (NULL == fRecs) { fRecs = rec; } else { - SkASSERT(NULL != fTopRec); + SkASSERT(fTopRec); fTopRec->fNext = rec; } fTopRec = rec; diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp index 9293f7fc2a..45e966f097 100644 --- a/src/effects/SkMagnifierImageFilter.cpp +++ b/src/effects/SkMagnifierImageFilter.cpp @@ -205,7 +205,7 @@ GrEffect* GrMagnifierEffect::TestCreate(SkRandom* random, texture->height() / (float) y, (float) inset / texture->width(), (float) inset / texture->height()); - SkASSERT(NULL != effect); + SkASSERT(effect); return effect; } diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index c6c470c390..df04cb170d 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -502,7 +502,7 @@ bool apply_morphology(const SkBitmap& input, SkISize radius, SkBitmap* dst) { GrTexture* srcTexture = input.getTexture(); - SkASSERT(NULL != srcTexture); + SkASSERT(srcTexture); GrContext* context = srcTexture->getContext(); srcTexture->ref(); SkAutoTUnref<GrTexture> src(srcTexture); diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index b0ebb39342..0247ed9e1b 100644 --- a/src/effects/SkPerlinNoiseShader.cpp +++ b/src/effects/SkPerlinNoiseShader.cpp @@ -966,7 +966,7 @@ void GrGLPerlinNoise::setData(const GrGLProgramDataManager& pdman, const GrDrawE bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint, const SkMatrix* externalLocalMatrix, GrColor* paintColor, GrEffect** effect) const { - SkASSERT(NULL != context); + SkASSERT(context); *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); @@ -1001,7 +1001,7 @@ bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint, SkMatrix m = context->getMatrix(); m.setTranslateX(-localMatrix.getTranslateX() + SK_Scalar1); m.setTranslateY(-localMatrix.getTranslateY() + SK_Scalar1); - if ((NULL != permutationsTexture) && (NULL != noiseTexture)) { + if ((permutationsTexture) && (noiseTexture)) { *effect = GrPerlinNoiseEffect::Create(fType, fNumOctaves, fStitchTiles, @@ -1016,10 +1016,10 @@ bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint, // Unlock immediately, this is not great, but we don't have a way of // knowing when else to unlock it currently. TODO: Remove this when // unref becomes the unlock replacement for all types of textures. - if (NULL != permutationsTexture) { + if (permutationsTexture) { GrUnlockAndUnrefCachedBitmapTexture(permutationsTexture); } - if (NULL != noiseTexture) { + if (noiseTexture) { GrUnlockAndUnrefCachedBitmapTexture(noiseTexture); } diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp index 3ca0c099b7..bed19ef89d 100644 --- a/src/effects/SkPictureImageFilter.cpp +++ b/src/effects/SkPictureImageFilter.cpp @@ -15,7 +15,7 @@ SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t uniqueID) : INHERITED(0, 0, NULL, uniqueID) , fPicture(SkSafeRef(picture)) - , fCropRect(NULL != picture ? picture->cullRect() : SkRect::MakeEmpty()) { + , fCropRect(picture ? picture->cullRect() : SkRect::MakeEmpty()) { } SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect, diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 8b391eebf4..3cab107373 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -438,7 +438,7 @@ GrEffect* SkTable_ColorFilter::asNewEffect(GrContext* context) const { this->asComponentTable(&bitmap); // passing NULL because this effect does no tiling or filtering. GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, bitmap, NULL); - if (NULL != texture) { + if (texture) { effect = ColorTableEffect::Create(texture, fFlags); // Unlock immediately, this is not great, but we don't have a way of 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; |