Index: include/gpu/GrEffectStage.h |
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h |
index fb0620d6e6df097ca1f15ef7f1961b1c22373aef..9e47451b631b4d1e7a78e61f9a4892edd76574fd 100644 |
--- a/include/gpu/GrEffectStage.h |
+++ b/include/gpu/GrEffectStage.h |
@@ -40,28 +40,31 @@ public: |
memcpy(fVertexAttribIndices, other.fVertexAttribIndices, sizeof(fVertexAttribIndices)); |
return *this; |
} |
+ |
+ static bool AreCompatible(const GrEffectStage& a, const GrEffectStage& b, |
+ bool usingExplicitLocalCoords) { |
+ SkASSERT(NULL != a.fEffect.get()); |
+ SkASSERT(NULL != b.fEffect.get()); |
- bool operator== (const GrEffectStage& other) const { |
- SkASSERT(NULL != fEffect.get()); |
- SkASSERT(NULL != other.fEffect.get()); |
- |
- if (!this->getEffect()->isEqual(*other.getEffect())) { |
+ if (!a.getEffect()->isEqual(*b.getEffect())) { |
return false; |
} |
robertphillips
2014/08/04 16:08:46
// When explicit local coordinates are in use the
bsalomon
2014/08/04 16:12:33
Done.
|
- if (fCoordChangeMatrixSet != other.fCoordChangeMatrixSet) { |
+ if (usingExplicitLocalCoords) { |
+ return true; |
+ } |
+ |
+ if (a.fCoordChangeMatrixSet != b.fCoordChangeMatrixSet) { |
return false; |
} |
- if (!fCoordChangeMatrixSet) { |
+ if (!a.fCoordChangeMatrixSet) { |
return true; |
} |
- return fCoordChangeMatrix == other.fCoordChangeMatrix; |
+ return a.fCoordChangeMatrix == b.fCoordChangeMatrix; |
} |
- bool operator!= (const GrEffectStage& s) const { return !(*this == s); } |
- |
/** |
* This is called when the coordinate system in which the geometry is specified will change. |
* |