Wrap all GrCustomStage textures in GrTextureAccess, remove StageDesc::fInConfigFlags
Review URL: https://codereview.appspot.com/6494114
git-svn-id: http://skia.googlecode.com/svn/trunk@5485 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 8c86326..0e7c2fc 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -231,14 +231,14 @@
virtual ~GrGradientEffect();
- unsigned int numTextures() const;
- GrTexture* texture(unsigned int index) const;
+ 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; };
- bool isEqual(const GrCustomStage& stage) const {
+ virtual bool isEqual(const GrCustomStage& stage) const SK_OVERRIDE {
const GrGradientEffect& s = static_cast<const GrGradientEffect&>(stage);
return INHERITED::isEqual(stage) && this->useAtlas() == s.useAtlas() &&
fYCoord == s.getYCoord();
@@ -260,7 +260,7 @@
SkShader::TileMode* tm);
private:
- GrTexture* fTexture;
+ GrTextureAccess fTextureAccess;
bool fUseTexture;
GrScalar fYCoord;
GrTextureStripAtlas* fAtlas;