Index: src/gpu/effects/GrBezierEffect.cpp |
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp |
index 1894192d5888b25fb8cd7792d452e5bc815159a1..798695d4eced4bdc39484e09dd487521df5334d2 100644 |
--- a/src/gpu/effects/GrBezierEffect.cpp |
+++ b/src/gpu/effects/GrBezierEffect.cpp |
@@ -25,8 +25,8 @@ public: |
const GrGLSLCaps&, |
GrProcessorKeyBuilder*); |
- void setData(const GrGLSLProgramDataManager& pdman, |
- const GrPrimitiveProcessor& primProc) override { |
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, |
+ FPCoordTransformIter&& transformIter) override { |
const GrConicEffect& ce = primProc.cast<GrConicEffect>(); |
if (!ce.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(ce.viewMatrix())) { |
@@ -47,14 +47,7 @@ public: |
pdman.set1f(fCoverageScaleUniform, GrNormalizeByteToFloat(ce.coverageScale())); |
fCoverageScale = ce.coverageScale(); |
} |
- } |
- |
- void setTransformData(const GrPrimitiveProcessor& primProc, |
- const GrGLSLProgramDataManager& pdman, |
- int index, |
- const SkTArray<const GrCoordTransform*, true>& transforms) override { |
- this->setTransformDataHelper(primProc.cast<GrConicEffect>().localMatrix(), pdman, index, |
- transforms); |
+ this->setTransformDataHelper(ce.localMatrix(), pdman, &transformIter); |
} |
private: |
@@ -109,8 +102,7 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
gpArgs->fPositionVar, |
gp.inPosition()->fName, |
gp.localMatrix(), |
- args.fTransformsIn, |
- args.fTransformsOut); |
+ args.fFPCoordTransformHandler); |
// TODO: this precision check should actually be a check on the number of bits |
// high and medium provide and the selection of the lowest level that suffices. |
@@ -299,8 +291,8 @@ public: |
const GrGLSLCaps&, |
GrProcessorKeyBuilder*); |
- void setData(const GrGLSLProgramDataManager& pdman, |
- const GrPrimitiveProcessor& primProc) override { |
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, |
+ FPCoordTransformIter&& transformIter) override { |
const GrQuadEffect& qe = primProc.cast<GrQuadEffect>(); |
if (!qe.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(qe.viewMatrix())) { |
@@ -321,14 +313,7 @@ public: |
pdman.set1f(fCoverageScaleUniform, GrNormalizeByteToFloat(qe.coverageScale())); |
fCoverageScale = qe.coverageScale(); |
} |
- } |
- |
- void setTransformData(const GrPrimitiveProcessor& primProc, |
- const GrGLSLProgramDataManager& pdman, |
- int index, |
- const SkTArray<const GrCoordTransform*, true>& transforms) override { |
- this->setTransformDataHelper(primProc.cast<GrQuadEffect>().localMatrix(), pdman, index, |
- transforms); |
+ this->setTransformDataHelper(qe.localMatrix(), pdman, &transformIter); |
} |
private: |
@@ -383,8 +368,7 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
gpArgs->fPositionVar, |
gp.inPosition()->fName, |
gp.localMatrix(), |
- args.fTransformsIn, |
- args.fTransformsOut); |
+ args.fFPCoordTransformHandler); |
fragBuilder->codeAppendf("float edgeAlpha;"); |
@@ -516,8 +500,8 @@ public: |
const GrGLSLCaps&, |
GrProcessorKeyBuilder*); |
- void setData(const GrGLSLProgramDataManager& pdman, |
- const GrPrimitiveProcessor& primProc) override { |
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, |
+ FPCoordTransformIter&& transformIter) override { |
const GrCubicEffect& ce = primProc.cast<GrCubicEffect>(); |
if (!ce.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(ce.viewMatrix())) { |
@@ -533,6 +517,7 @@ public: |
pdman.set4fv(fColorUniform, 1, c); |
fColor = ce.color(); |
} |
+ this->setTransformDataHelper(SkMatrix::I(), pdman, &transformIter); |
} |
private: |
@@ -584,8 +569,7 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
uniformHandler, |
gpArgs->fPositionVar, |
gp.inPosition()->fName, |
- args.fTransformsIn, |
- args.fTransformsOut); |
+ args.fFPCoordTransformHandler); |
GrGLSLShaderVar edgeAlpha("edgeAlpha", kFloat_GrSLType, 0, kHigh_GrSLPrecision); |