Index: include/gpu/GrEffectStage.h |
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h |
index fb0620d6e6df097ca1f15ef7f1961b1c22373aef..84ccbbf091dd6ccfa7a82d4412360336f891629d 100644 |
--- a/include/gpu/GrEffectStage.h |
+++ b/include/gpu/GrEffectStage.h |
@@ -20,8 +20,8 @@ |
class GrEffectStage { |
public: |
- explicit GrEffectStage(const GrEffect* effect, int attrIndex0 = -1, int attrIndex1 = -1) |
- : fEffect(SkRef(effect)) { |
+ explicit GrEffectStage(const GrEffectRef* effectRef, int attrIndex0 = -1, int attrIndex1 = -1) |
+ : fEffectRef(SkRef(effectRef)) { |
fCoordChangeMatrixSet = false; |
fVertexAttribIndices[0] = attrIndex0; |
fVertexAttribIndices[1] = attrIndex1; |
@@ -36,14 +36,14 @@ |
if (other.fCoordChangeMatrixSet) { |
fCoordChangeMatrix = other.fCoordChangeMatrix; |
} |
- fEffect.reset(SkRef(other.fEffect.get())); |
+ fEffectRef.reset(SkRef(other.fEffectRef.get())); |
memcpy(fVertexAttribIndices, other.fVertexAttribIndices, sizeof(fVertexAttribIndices)); |
return *this; |
} |
bool operator== (const GrEffectStage& other) const { |
- SkASSERT(NULL != fEffect.get()); |
- SkASSERT(NULL != other.fEffect.get()); |
+ SkASSERT(NULL != fEffectRef.get()); |
+ SkASSERT(NULL != other.fEffectRef.get()); |
if (!this->getEffect()->isEqual(*other.getEffect())) { |
return false; |
@@ -81,7 +81,7 @@ |
private: |
bool fCoordChangeMatrixSet; |
SkMatrix fCoordChangeMatrix; |
- SkDEBUGCODE(mutable SkAutoTUnref<const GrEffect> fEffect;) |
+ SkDEBUGCODE(mutable SkAutoTUnref<const GrEffectRef> fEffectRef;) |
friend class GrEffectStage; |
}; |
@@ -97,9 +97,9 @@ |
if (fCoordChangeMatrixSet) { |
savedCoordChange->fCoordChangeMatrix = fCoordChangeMatrix; |
} |
- SkASSERT(NULL == savedCoordChange->fEffect.get()); |
- SkDEBUGCODE(SkRef(fEffect.get());) |
- SkDEBUGCODE(savedCoordChange->fEffect.reset(fEffect.get());) |
+ SkASSERT(NULL == savedCoordChange->fEffectRef.get()); |
+ SkDEBUGCODE(SkRef(fEffectRef.get());) |
+ SkDEBUGCODE(savedCoordChange->fEffectRef.reset(fEffectRef.get());) |
} |
/** |
@@ -110,8 +110,8 @@ |
if (fCoordChangeMatrixSet) { |
fCoordChangeMatrix = savedCoordChange.fCoordChangeMatrix; |
} |
- SkASSERT(savedCoordChange.fEffect.get() == fEffect); |
- SkDEBUGCODE(savedCoordChange.fEffect.reset(NULL);) |
+ SkASSERT(savedCoordChange.fEffectRef.get() == fEffectRef); |
+ SkDEBUGCODE(savedCoordChange.fEffectRef.reset(NULL);) |
} |
/** |
@@ -126,15 +126,15 @@ |
} |
} |
- const GrEffect* getEffect() const { return fEffect.get(); } |
+ const GrEffect* getEffect() const { return fEffectRef.get()->get(); } |
const int* getVertexAttribIndices() const { return fVertexAttribIndices; } |
- int getVertexAttribIndexCount() const { return fEffect->numVertexAttribs(); } |
+ int getVertexAttribIndexCount() const { return fEffectRef->get()->numVertexAttribs(); } |
private: |
bool fCoordChangeMatrixSet; |
SkMatrix fCoordChangeMatrix; |
- SkAutoTUnref<const GrEffect> fEffect; |
+ SkAutoTUnref<const GrEffectRef> fEffectRef; |
int fVertexAttribIndices[2]; |
}; |