diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkBitmapProcState.cpp | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientShader.cpp | 12 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientShaderPriv.h | 2 | ||||
-rw-r--r-- | src/effects/gradients/SkSweepGradient.cpp | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp index 6ab3126113..25f90d60af 100644 --- a/src/core/SkBitmapProcState.cpp +++ b/src/core/SkBitmapProcState.cpp @@ -301,7 +301,7 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { bool trivialMatrix = (fInvMatrix.getType() & ~SkMatrix::kTranslate_Mask) == 0; bool clampClamp = SkShader::kClamp_TileMode == fTileModeX && SkShader::kClamp_TileMode == fTileModeY; - + if (!(clampClamp || trivialMatrix)) { fInvMatrix.postIDiv(fOrigBitmap.width(), fOrigBitmap.height()); } diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp index 8bbdc21a18..16a3640e29 100644 --- a/src/effects/gradients/SkGradientShader.cpp +++ b/src/effects/gradients/SkGradientShader.cpp @@ -838,7 +838,7 @@ void GrGLGradientEffect::emitUniforms(GrGLShaderBuilder* builder, EffectKey key) kVec4f_GrSLType, "GradientStartColor"); fColorEndUni = builder->addUniform(GrGLShaderBuilder::kFragment_Visibility, kVec4f_GrSLType, "GradientEndColor"); - + } else if (GrGradientEffect::kThree_ColorType == ColorTypeFromKey(key)){ // 3 Color Case fColorStartUni = builder->addUniform(GrGLShaderBuilder::kFragment_Visibility, kVec4f_GrSLType, "GradientStartColor"); @@ -907,7 +907,7 @@ void GrGLGradientEffect::setData(const GrGLUniformManager& uman, } else { const GrTexture* texture = e.texture(0); fEffectMatrix.setData(uman, e.getMatrix(), drawEffect, texture); - + SkScalar yCoord = e.getYCoord(); if (yCoord != fCachedYCoord) { uman.set1f(fFSYUni, yCoord); @@ -920,11 +920,11 @@ void GrGLGradientEffect::setData(const GrGLUniformManager& uman, GrGLEffect::EffectKey GrGLGradientEffect::GenBaseGradientKey(const GrDrawEffect& drawEffect) { const GrGradientEffect& e = drawEffect.castEffect<GrGradientEffect>(); const GrTexture* texture = NULL; - + if (GrGradientEffect::kTexture_ColorType == e.getColorType()){ texture = e.texture(0); } - + EffectKey key = GrGLEffectMatrix::GenKey(e.getMatrix(), drawEffect, kCoordsType, texture); if (GrGradientEffect::kTwo_ColorType == e.getColorType()) { @@ -1050,7 +1050,7 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx, SkBitmap bitmap; shader.getGradientTableBitmap(&bitmap); fColorType = kTexture_ColorType; - + GrTextureStripAtlas::Desc desc; desc.fWidth = bitmap.width(); desc.fHeight = 32; @@ -1107,7 +1107,7 @@ bool GrGradientEffect::onIsEqual(const GrEffect& effect) const { return false; } } - + return fTextureAccess.getTexture() == s.fTextureAccess.getTexture() && fTextureAccess.getParams().getTileModeX() == s.fTextureAccess.getParams().getTileModeX() && diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h index f7a41893db..55a0061349 100644 --- a/src/effects/gradients/SkGradientShaderPriv.h +++ b/src/effects/gradients/SkGradientShaderPriv.h @@ -250,7 +250,7 @@ public: const SkMatrix& getMatrix() const { return fMatrix;} virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE; - + enum ColorType { kTwo_ColorType, kThree_ColorType, diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp index 669acd2197..65e6c96a4c 100644 --- a/src/effects/gradients/SkSweepGradient.cpp +++ b/src/effects/gradients/SkSweepGradient.cpp @@ -477,7 +477,7 @@ void GrGLSweepGradient::emitCode(GrGLShaderBuilder* builder, this->setupMatrix(builder, key, &coords); SkString t; t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5", coords.c_str(), coords.c_str()); - this->emitColor(builder, t.c_str(), key, + this->emitColor(builder, t.c_str(), key, outputColor, inputColor, samplers); } |