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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 2339203002: Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (Closed)
Patch Set: Fix issue of taking ref to a temporary 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 1b496b3657f99af3904eca94c6202b0639bedf7c..497f6b76d539f9f05627692d1748def7f72c0eb7 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -99,8 +99,7 @@ public:
gpArgs->fPositionVar,
gp.inLocalCoords()->fName,
gp.localMatrix(),
- args.fTransformsIn,
- args.fTransformsOut);
+ args.fFPCoordTransformHandler);
} else {
// emit transforms with position
this->emitTransforms(vertBuilder,
@@ -109,8 +108,7 @@ public:
gpArgs->fPositionVar,
gp.inPosition()->fName,
gp.localMatrix(),
- args.fTransformsIn,
- args.fTransformsOut);
+ args.fFPCoordTransformHandler);
}
// Setup coverage as pass through
@@ -150,7 +148,8 @@ public:
}
void setData(const GrGLSLProgramDataManager& pdman,
- const GrPrimitiveProcessor& gp) override {
+ const GrPrimitiveProcessor& gp,
+ FPCoordTransformIter&& transformIter) override {
const DefaultGeoProc& dgp = gp.cast<DefaultGeoProc>();
if (!dgp.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(dgp.viewMatrix())) {
@@ -172,14 +171,7 @@ public:
pdman.set1f(fCoverageUniform, GrNormalizeByteToFloat(dgp.coverage()));
fCoverage = dgp.coverage();
}
- }
-
- 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);
+ this->setTransformDataHelper(dgp.fLocalMatrix, pdman, &transformIter);
}
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