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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.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 | « include/gpu/GrFragmentProcessor.h ('k') | src/gpu/GrFragmentProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 497f6b76d539f9f05627692d1748def7f72c0eb7..1b496b3657f99af3904eca94c6202b0639bedf7c 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -99,7 +99,8 @@
gpArgs->fPositionVar,
gp.inLocalCoords()->fName,
gp.localMatrix(),
- args.fFPCoordTransformHandler);
+ args.fTransformsIn,
+ args.fTransformsOut);
} else {
// emit transforms with position
this->emitTransforms(vertBuilder,
@@ -108,7 +109,8 @@
gpArgs->fPositionVar,
gp.inPosition()->fName,
gp.localMatrix(),
- args.fFPCoordTransformHandler);
+ args.fTransformsIn,
+ args.fTransformsOut);
}
// Setup coverage as pass through
@@ -148,8 +150,7 @@
}
void setData(const GrGLSLProgramDataManager& pdman,
- const GrPrimitiveProcessor& gp,
- FPCoordTransformIter&& transformIter) override {
+ const GrPrimitiveProcessor& gp) override {
const DefaultGeoProc& dgp = gp.cast<DefaultGeoProc>();
if (!dgp.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(dgp.viewMatrix())) {
@@ -171,7 +172,14 @@
pdman.set1f(fCoverageUniform, GrNormalizeByteToFloat(dgp.coverage()));
fCoverage = dgp.coverage();
}
- this->setTransformDataHelper(dgp.fLocalMatrix, pdman, &transformIter);
+ }
+
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLSLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
+ this->setTransformDataHelper(primProc.cast<DefaultGeoProc>().fLocalMatrix, pdman, index,
+ transforms);
}
private:
« no previous file with comments | « include/gpu/GrFragmentProcessor.h ('k') | src/gpu/GrFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698