Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002
Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6
Review-Url: https://codereview.chromium.org/2339203002
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index d6b5578..19dd366 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -148,8 +148,8 @@
// emit transforms
this->emitTransforms(vsBuilder, varyingHandler, uniformHandler, gpArgs->fPositionVar,
- qp.inPosition()->fName, SkMatrix::I(), args.fTransformsIn,
- args.fTransformsOut);
+ qp.inPosition()->fName, SkMatrix::I(),
+ args.fFPCoordTransformHandler);
GrGLSLPPFragmentBuilder* fsBuilder = args.fFragBuilder;
fsBuilder->codeAppendf("if (%s.x * %s.x >= %s.y) discard;", uv.fsIn(), uv.fsIn(),
@@ -167,14 +167,15 @@
b->add32(key);
}
- virtual void setData(const GrGLSLProgramDataManager& pdman,
- const GrPrimitiveProcessor& gp) override {
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& gp,
+ FPCoordTransformIter&& transformIter) override {
const MSAAQuadProcessor& qp = gp.cast<MSAAQuadProcessor>();
if (!qp.viewMatrix().isIdentity()) {
float viewMatrix[3 * 3];
GrGLSLGetMatrix<3>(viewMatrix, qp.viewMatrix());
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
+ this->setTransformDataHelper(SkMatrix::I(), pdman, &transformIter);
}
private: