Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: src/gpu/batches/GrPLSPathRenderer.cpp

Issue 2351753002: Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrPLSPathRenderer.cpp
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index e8711c09de49a6067f3f4745db97f435838f5d36..81009a6a3cf9060ebad58e6734b2ad6f31adacd8 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -333,8 +333,8 @@
// emit transforms
this->emitTransforms(vsBuilder, varyingHandler, uniformHandler, gpArgs->fPositionVar,
- te.inPosition()->fName, te.localMatrix(),
- args.fFPCoordTransformHandler);
+ te.inPosition()->fName, te.localMatrix(), args.fTransformsIn,
+ args.fTransformsOut);
GrGLSLPPFragmentBuilder* fsBuilder = args.fFragBuilder;
SkAssertResult(fsBuilder->enableFeature(
@@ -391,10 +391,16 @@
b->add32(key);
}
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& gp,
- FPCoordTransformIter&& transformIter) override {
- this->setTransformDataHelper(gp.cast<PLSAATriangleEffect>().fLocalMatrix, pdman,
- &transformIter);
+ virtual void setData(const GrGLSLProgramDataManager& pdman,
+ const GrPrimitiveProcessor& gp) override {
+ }
+
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLSLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
+ this->setTransformDataHelper(primProc.cast<PLSAATriangleEffect>().fLocalMatrix, pdman,
+ index, transforms);
}
private:
@@ -516,8 +522,8 @@
// emit transforms
this->emitTransforms(vsBuilder, varyingHandler, uniformHandler, gpArgs->fPositionVar,
- qe.inPosition()->fName, qe.localMatrix(),
- args.fFPCoordTransformHandler);
+ qe.inPosition()->fName, qe.localMatrix(), args.fTransformsIn,
+ args.fTransformsOut);
GrGLSLPPFragmentBuilder* fsBuilder = args.fFragBuilder;
SkAssertResult(fsBuilder->enableFeature(
@@ -575,10 +581,16 @@
b->add32(key);
}
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& gp,
- FPCoordTransformIter&& transformIter) override {
- this->setTransformDataHelper(gp.cast<PLSQuadEdgeEffect>().fLocalMatrix, pdman,
- &transformIter);
+ virtual void setData(const GrGLSLProgramDataManager& pdman,
+ const GrPrimitiveProcessor& gp) override {
+ }
+
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLSLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
+ this->setTransformDataHelper(primProc.cast<PLSQuadEdgeEffect>().fLocalMatrix, pdman,
+ index, transforms);
}
private:
@@ -668,8 +680,8 @@
varyingHandler->emitAttributes(fe);
this->setupPosition(vsBuilder, gpArgs, fe.inPosition()->fName);
this->emitTransforms(vsBuilder, varyingHandler, uniformHandler, gpArgs->fPositionVar,
- fe.inPosition()->fName, fe.localMatrix(),
- args.fFPCoordTransformHandler);
+ fe.inPosition()->fName, fe.localMatrix(), args.fTransformsIn,
+ args.fTransformsOut);
GrGLSLPPFragmentBuilder* fsBuilder = args.fFragBuilder;
SkAssertResult(fsBuilder->enableFeature(
@@ -704,8 +716,8 @@
b->add32(key);
}
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& gp,
- FPCoordTransformIter&& transformIter) override {
+ virtual void setData(const GrGLSLProgramDataManager& pdman,
+ const GrPrimitiveProcessor& gp) override {
const PLSFinishEffect& fe = gp.cast<PLSFinishEffect>();
pdman.set1f(fUseEvenOdd, fe.fUseEvenOdd);
if (fe.color() != fColor && !fe.colorIgnored()) {
@@ -714,7 +726,14 @@
pdman.set4fv(fColorUniform, 1, c);
fColor = fe.color();
}
- this->setTransformDataHelper(fe.fLocalMatrix, pdman, &transformIter);
+ }
+
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLSLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
+ this->setTransformDataHelper(primProc.cast<PLSFinishEffect>().fLocalMatrix, pdman,
+ index, transforms);
}
private:
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698