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
This commit is contained in:
parent
ae5ef113eb
commit
484ee2a5fe
@ -70,7 +70,7 @@ public:
|
||||
class SavedCoordChange {
|
||||
private:
|
||||
GrMatrix fCoordChangeMatrix;
|
||||
GR_DEBUGCODE(mutable SkAutoTUnref<GrEffect> fEffect;)
|
||||
GR_DEBUGCODE(mutable SkAutoTUnref<const GrEffect> 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;)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user