diff options
Diffstat (limited to 'src/effects/gradients')
-rw-r--r-- | src/effects/gradients/SkGradientShader.cpp | 8 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientShaderPriv.h | 5 |
2 files changed, 3 insertions, 10 deletions
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp index 9a965ff817..cc7e13ccb6 100644 --- a/src/effects/gradients/SkGradientShader.cpp +++ b/src/effects/gradients/SkGradientShader.cpp @@ -719,7 +719,7 @@ void GrGLGradientStage::emitColorLookup(GrGLShaderBuilder* builder, GrGradientEffect::GrGradientEffect(GrContext* ctx, const SkGradientShaderBase& shader, SkShader::TileMode tileMode) - : fUseTexture (true) { + : INHERITED(1) { // TODO: check for simple cases where we don't need a texture: //GradientInfo info; //shader.asAGradient(&info); @@ -765,12 +765,8 @@ GrGradientEffect::~GrGradientEffect() { } } -int GrGradientEffect::numTextures() const { - return fUseTexture ? 1 : 0; -} - const GrTextureAccess& GrGradientEffect::textureAccess(int index) const { - GrAssert(fUseTexture && 0 == index); + GrAssert(0 == index); return fTextureAccess; } diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h index bdea9008e8..61b9c35774 100644 --- a/src/effects/gradients/SkGradientShaderPriv.h +++ b/src/effects/gradients/SkGradientShaderPriv.h @@ -232,12 +232,10 @@ public: virtual ~GrGradientEffect(); - virtual int numTextures() const SK_OVERRIDE; virtual const GrTextureAccess& textureAccess(int index) const SK_OVERRIDE; - bool useTexture() const { return fUseTexture; } bool useAtlas() const { return SkToBool(-1 != fRow); } - GrScalar getYCoord() const { GrAssert(fUseTexture); return fYCoord; }; + GrScalar getYCoord() const { return fYCoord; }; virtual bool isEqual(const GrCustomStage& stage) const SK_OVERRIDE { const GrGradientEffect& s = static_cast<const GrGradientEffect&>(stage); @@ -262,7 +260,6 @@ protected: private: GrTextureAccess fTextureAccess; - bool fUseTexture; GrScalar fYCoord; GrTextureStripAtlas* fAtlas; int fRow; |