Index: src/gpu/GrPendingFragmentStage.h |
diff --git a/src/gpu/GrPendingFragmentStage.h b/src/gpu/GrPendingFragmentStage.h |
index 6c61029eca5a4767b4946754af22c0893ba2839f..0bf984ab7d68ced7be7fdc79637ac6201372a822 100644 |
--- a/src/gpu/GrPendingFragmentStage.h |
+++ b/src/gpu/GrPendingFragmentStage.h |
@@ -12,55 +12,42 @@ |
#include "GrCoordTransform.h" |
#include "GrFragmentProcessor.h" |
#include "GrPendingProgramElement.h" |
-#include "SkMatrix.h" |
/** |
* This a baked variant of GrFragmentStage, as recorded in GrOptDrawState. |
*/ |
class GrPendingFragmentStage { |
public: |
- GrPendingFragmentStage(const GrFragmentStage& stage, bool ignoreMatrix) |
- : fProc(stage.getProcessor()) |
- , fCoordChangeMatrix(ignoreMatrix ? SkMatrix::I() : stage.getCoordChangeMatrix()) { |
- } |
+ GrPendingFragmentStage(const GrFragmentStage& stage) : fProc(stage.processor()) {} |
GrPendingFragmentStage(const GrPendingFragmentStage& that) { *this = that; } |
GrPendingFragmentStage& operator=(const GrPendingFragmentStage& that) { |
fProc.reset(that.fProc.get()); |
- fCoordChangeMatrix = that.fCoordChangeMatrix; |
return *this; |
} |
bool operator==(const GrPendingFragmentStage& that) const { |
- return this->getProcessor()->isEqual(*that.getProcessor()) && |
- fCoordChangeMatrix == that.fCoordChangeMatrix; |
+ return this->processor()->isEqual(*that.processor()); |
} |
bool operator!=(const GrPendingFragmentStage& that) const { return !(*this == that); } |
- const SkMatrix& getCoordChangeMatrix() const { return fCoordChangeMatrix; } |
- |
/** |
* For a coord transform on the fragment processor, does it or the coord change matrix (if |
* relevant) contain perspective? |
*/ |
bool isPerspectiveCoordTransform(int matrixIndex) const { |
- const GrCoordTransform& coordTransform = this->getProcessor()->coordTransform(matrixIndex); |
+ const GrCoordTransform& coordTransform = this->processor()->coordTransform(matrixIndex); |
uint32_t type = coordTransform.getMatrix().getType(); |
- if (kLocal_GrCoordSet == coordTransform.sourceCoords()) { |
- type |= this->getCoordChangeMatrix().getType(); |
- } |
- |
return SkToBool(SkMatrix::kPerspective_Mask & type); |
} |
const char* name() const { return fProc->name(); } |
- const GrFragmentProcessor* getProcessor() const { return fProc.get(); } |
+ const GrFragmentProcessor* processor() const { return fProc.get(); } |
protected: |
GrPendingProgramElement<const GrFragmentProcessor> fProc; |
- SkMatrix fCoordChangeMatrix; |
}; |
#endif |