| Index: include/gpu/GrEffectStage.h
|
| diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h
|
| index 6df7f90d6334a6d965151d36fa6e4f492c1347fc..b42d309d4b24c91e893a308a684c613c53a73a07 100644
|
| --- a/include/gpu/GrEffectStage.h
|
| +++ b/include/gpu/GrEffectStage.h
|
| @@ -12,6 +12,7 @@
|
| #define GrEffectStage_DEFINED
|
|
|
| #include "GrBackendEffectFactory.h"
|
| +#include "GrCoordTransform.h"
|
| #include "GrEffect.h"
|
| #include "GrProgramElementRef.h"
|
| #include "SkMatrix.h"
|
| @@ -128,6 +129,23 @@ public:
|
| }
|
| }
|
|
|
| + bool isPerspectiveCoordTransform(int matrixIndex, bool useExplicitLocalCoords) const {
|
| + const GrCoordTransform& coordTransform = this->getEffect()->coordTransform(matrixIndex);
|
| + SkMatrix::TypeMask type0 = coordTransform.getMatrix().getType();
|
| + SkMatrix::TypeMask type1 = SkMatrix::kIdentity_Mask;
|
| + if (kLocal_GrCoordSet == coordTransform.sourceCoords()) {
|
| + type1 = useExplicitLocalCoords ?
|
| + SkMatrix::kIdentity_Mask : this->getCoordChangeMatrix().getType();
|
| + }
|
| +
|
| + int combinedTypes = type0 | type1;
|
| + if (SkMatrix::kPerspective_Mask & combinedTypes) {
|
| + return true;
|
| + } else {
|
| + return false;
|
| + }
|
| + }
|
| +
|
| const GrEffect* getEffect() const { return fEffect.get(); }
|
|
|
| void convertToPendingExec() { fEffect.convertToPendingExec(); }
|
|
|