diff options
author | bsalomon <bsalomon@google.com> | 2014-09-05 13:34:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-05 13:34:00 -0700 |
commit | 49f085dddff10473b6ebf832a974288300224e60 (patch) | |
tree | 308a3cac5e1fb053c9e27e7d07213d72eaa05409 /src/gpu/gl/builders | |
parent | 7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff) |
"NULL !=" = NULL
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'src/gpu/gl/builders')
-rw-r--r-- | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.cpp | 8 | ||||
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.h | 4 | ||||
-rw-r--r-- | src/gpu/gl/builders/GrGLShaderBuilder.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/builders/GrGLShaderBuilder.h | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp index fef3691cd3..6c92684203 100644 --- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp +++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp @@ -48,7 +48,7 @@ GrGLFragmentShaderBuilder::DstReadKey GrGLFragmentShaderBuilder::KeyForDstRead( if (caps.fbFetchSupport()) { return key; } - SkASSERT(NULL != dstCopy); + SkASSERT(dstCopy); if (!caps.textureSwizzleSupport() && GrPixelConfigIsAlphaOnly(dstCopy->config())) { // The fact that the config is alpha-only must be considered when generating code. key |= kUseAlphaConfig_DstReadKeyBit; diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index ab64e28a78..3844a30f92 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp @@ -156,7 +156,7 @@ GrGLProgramDataManager::UniformHandle GrGLProgramBuilder::addUniformArray(uint32 uni.fVariable.setPrecision(kDefaultFragmentPrecision); } - if (NULL != outName) { + if (outName) { *outName = uni.fVariable.c_str(); } return GrGLProgramDataManager::UniformHandle::CreateFromUniformIndex(fUniforms.count() - 1); @@ -190,7 +190,7 @@ void GrGLProgramBuilder::createAndEmitEffects(GrGLProgramEffectsBuilder* program GrGLSLExpr4 outColor; for (int e = 0; e < effectCnt; ++e) { - SkASSERT(NULL != effectStages[e] && NULL != effectStages[e]->getEffect()); + SkASSERT(effectStages[e] && effectStages[e]->getEffect()); const GrEffectStage& stage = *effectStages[e]; CodeStage::AutoStageRestore csar(&fCodeStage, &stage); @@ -344,7 +344,7 @@ void GrGLFullProgramBuilder::emitCodeBeforeEffects(GrGLSLExpr4* color, void GrGLFullProgramBuilder::emitGeometryProcessor(const GrEffectStage* geometryProcessor, GrGLSLExpr4* coverage) { - if (NULL != geometryProcessor) { + if (geometryProcessor) { GrGLProgramDesc::EffectKeyProvider geometryProcessorKeyProvider( &this->desc(), GrGLProgramDesc::EffectKeyProvider::kGeometryProcessor_EffectType); fGeometryProcessor.reset(this->createAndEmitEffect( @@ -411,7 +411,7 @@ void GrGLFullProgramBuilder::createAndEmitEffect(GrGLProgramEffectsBuilder* prog GrGLSLExpr4 inColor = *fsInOutColor; GrGLSLExpr4 outColor; - SkASSERT(NULL != effectStages && NULL != effectStages->getEffect()); + SkASSERT(effectStages && effectStages->getEffect()); const GrEffectStage& stage = *effectStages; // Using scope to force ASR destructor to be triggered diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h index deb3708bd1..01269aa5ea 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.h +++ b/src/gpu/gl/builders/GrGLProgramBuilder.h @@ -184,7 +184,7 @@ protected: bool inStageCode() const { this->validate(); - return NULL != fEffectStage; + return SkToBool(fEffectStage); } const GrEffectStage* effectStage() const { @@ -200,7 +200,7 @@ protected: class AutoStageRestore : SkNoncopyable { public: AutoStageRestore(CodeStage* codeStage, const GrEffectStage* newStage) { - SkASSERT(NULL != codeStage); + SkASSERT(codeStage); fSavedIndex = codeStage->fCurrentIndex; fSavedEffectStage = codeStage->fEffectStage; diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp index 6b3e1d12dd..b7c7bbf532 100644 --- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp +++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp @@ -26,7 +26,7 @@ void append_texture_lookup(SkString* out, uint32_t configComponentMask, const char* swizzle, GrSLType varyingType = kVec2f_GrSLType) { - SkASSERT(NULL != coordName); + SkASSERT(coordName); out->appendf("%s(%s, %s)", sample_function_name(varyingType, gpu->glslGeneration()), diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.h b/src/gpu/gl/builders/GrGLShaderBuilder.h index ffb324773a..4921fd32bd 100644 --- a/src/gpu/gl/builders/GrGLShaderBuilder.h +++ b/src/gpu/gl/builders/GrGLShaderBuilder.h @@ -118,7 +118,7 @@ public: class ShaderBlock { public: ShaderBlock(GrGLShaderBuilder* builder) : fBuilder(builder) { - SkASSERT(NULL != builder); + SkASSERT(builder); fBuilder->codeAppend("{"); } |