From 484ee2a5fe47c204d9dda6acba54f9789d1cf69f Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Mon, 29 Oct 2012 16:25:04 +0000 Subject: [PATCH] Make GrEffectStage keep a const ptr (rather than non-const) to GrEffect. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6811045 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6166 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/gpu/GrEffectStage.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h index 23b629a166..bf7215e536 100644 --- a/include/gpu/GrEffectStage.h +++ b/include/gpu/GrEffectStage.h @@ -70,7 +70,7 @@ public: class SavedCoordChange { private: GrMatrix fCoordChangeMatrix; - GR_DEBUGCODE(mutable SkAutoTUnref fEffect;) + GR_DEBUGCODE(mutable SkAutoTUnref fEffect;) friend class GrEffectStage; }; @@ -123,7 +123,7 @@ public: GrSafeSetNull(fEffect); } - GrEffect* setEffect(GrEffect* effect) { + const GrEffect* setEffect(const GrEffect* effect) { GrAssert(0 == fSavedCoordChangeCnt); GrSafeAssign(fEffect, effect); fMatrix.reset(); @@ -131,7 +131,7 @@ public: return effect; } - GrEffect* setEffect(GrEffect* effect, const GrMatrix& matrix) { + const GrEffect* setEffect(const GrEffect* effect, const GrMatrix& matrix) { GrAssert(0 == fSavedCoordChangeCnt); GrSafeAssign(fEffect, effect); fMatrix = matrix; @@ -144,7 +144,7 @@ public: private: GrMatrix fCoordChangeMatrix; GrMatrix fMatrix; // TODO: remove this, store in GrEffect - GrEffect* fEffect; + const GrEffect* fEffect; GR_DEBUGCODE(mutable int fSavedCoordChangeCnt;) };