Remove getter of writable GrEffectStage from GrDrawState.
Upcoming changes will require GrDrawState to know things about the set of installed effects. Thus all setting of effects must go through a GrDrawState function (setEffect()). This change accomplishes that.
Review URL: https://codereview.appspot.com/7214045
git-svn-id: http://skia.googlecode.com/svn/trunk@7411 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 5568938..98683a4 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -910,14 +910,17 @@
// for use with textures released from an GrAutoScratchTexture.
void addExistingTextureToCache(GrTexture* texture);
- bool installPMToUPMEffect(GrTexture* texture,
- bool swapRAndB,
- const SkMatrix& matrix,
- GrEffectStage* stage);
- bool installUPMToPMEffect(GrTexture* texture,
- bool swapRAndB,
- const SkMatrix& matrix,
- GrEffectStage* stage);
+ /**
+ * These functions create premul <-> unpremul effects if it is possible to generate a pair
+ * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. Otherwise, they
+ * return NULL.
+ */
+ const GrEffectRef* createPMToUPMEffect(GrTexture* texture,
+ bool swapRAndB,
+ const SkMatrix& matrix);
+ const GrEffectRef* createUPMToPMEffect(GrTexture* texture,
+ bool swapRAndB,
+ const SkMatrix& matrix);
typedef GrRefCnt INHERITED;
};