Index: src/gpu/effects/GrDistanceFieldGeoProc.cpp |
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp |
index c74c5cec8048d31362d11ff00f33f018471cebe0..5404b0c80570cecf5255132f23c0edfdd7f3fd28 100644 |
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp |
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp |
@@ -73,8 +73,7 @@ public: |
uniformHandler, |
gpArgs->fPositionVar, |
dfTexEffect.inPosition()->fName, |
- args.fTransformsIn, |
- args.fTransformsOut); |
+ args.fFPCoordTransformHandler); |
// add varyings |
GrGLSLVertToFrag recipScale(kFloat_GrSLType); |
@@ -179,7 +178,8 @@ public: |
fragBuilder->codeAppendf("%s = vec4(val);", args.fOutputCoverage); |
} |
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& proc) override { |
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& proc, |
+ FPCoordTransformIter&& transformIter) override { |
#ifdef SK_GAMMA_APPLY_TO_A8 |
const GrDistanceFieldA8TextGeoProc& dfTexEffect = proc.cast<GrDistanceFieldA8TextGeoProc>(); |
float distanceAdjust = dfTexEffect.getDistanceAdjust(); |
@@ -196,6 +196,7 @@ public: |
GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix); |
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
} |
+ this->setTransformDataHelper(SkMatrix::I(), pdman, &transformIter); |
} |
static inline void GenKey(const GrGeometryProcessor& gp, |
@@ -345,8 +346,7 @@ public: |
uniformHandler, |
gpArgs->fPositionVar, |
dfTexEffect.inPosition()->fName, |
- args.fTransformsIn, |
- args.fTransformsOut); |
+ args.fFPCoordTransformHandler); |
const char* textureSizeUniName = nullptr; |
fTextureSizeUni = uniformHandler->addUniform(kFragment_GrShaderFlag, |
@@ -433,7 +433,8 @@ public: |
fragBuilder->codeAppendf("%s = vec4(val);", args.fOutputCoverage); |
} |
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& proc) override { |
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& proc, |
+ FPCoordTransformIter&& transformIter) override { |
SkASSERT(fTextureSizeUni.isValid()); |
GrTexture* texture = proc.texture(0); |
@@ -453,6 +454,7 @@ public: |
GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix); |
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
} |
+ this->setTransformDataHelper(SkMatrix::I(), pdman, &transformIter); |
} |
static inline void GenKey(const GrGeometryProcessor& gp, |
@@ -582,8 +584,7 @@ public: |
uniformHandler, |
gpArgs->fPositionVar, |
dfTexEffect.inPosition()->fName, |
- args.fTransformsIn, |
- args.fTransformsOut); |
+ args.fFPCoordTransformHandler); |
// set up varyings |
bool isUniformScale = (dfTexEffect.getFlags() & kUniformScale_DistanceFieldEffectMask) == |
@@ -732,8 +733,8 @@ public: |
fragBuilder->codeAppendf("%s = val;", args.fOutputCoverage); |
} |
- void setData(const GrGLSLProgramDataManager& pdman, |
- const GrPrimitiveProcessor& processor) override { |
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& processor, |
+ FPCoordTransformIter&& transformIter) override { |
SkASSERT(fDistanceAdjustUni.isValid()); |
const GrDistanceFieldLCDTextGeoProc& dflcd = processor.cast<GrDistanceFieldLCDTextGeoProc>(); |
@@ -752,6 +753,7 @@ public: |
GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix); |
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
} |
+ this->setTransformDataHelper(SkMatrix::I(), pdman, &transformIter); |
} |
static inline void GenKey(const GrGeometryProcessor& gp, |