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/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index b2fe0cc..b2e9205 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -38,21 +38,19 @@
///////////////////////////////////////////////////////////////////////////////
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture)
- : fTexture (texture) {
- SkSafeRef(fTexture);
+ : fTextureAccess(texture) {
}
GrSingleTextureEffect::~GrSingleTextureEffect() {
- SkSafeUnref(fTexture);
}
-unsigned int GrSingleTextureEffect::numTextures() const {
+int GrSingleTextureEffect::numTextures() const {
return 1;
}
-GrTexture* GrSingleTextureEffect::texture(unsigned int index) const {
+const GrTextureAccess& GrSingleTextureEffect::textureAccess(int index) const {
GrAssert(0 == index);
- return fTexture;
+ return fTextureAccess;
}
const GrProgramStageFactory& GrSingleTextureEffect::getFactory() const {