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

Unified Diff: src/gpu/GrOvalRenderer.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/GrFragmentProcessor.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index 90b2d8e4f1758ea88a89e472bf1594770e4d79d2..a04aa007116c41f8282a743afe747b7eda7cd748 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -161,7 +161,8 @@
gpArgs->fPositionVar,
cgp.fInPosition->fName,
cgp.fLocalMatrix,
- args.fFPCoordTransformHandler);
+ args.fTransformsIn,
+ args.fTransformsOut);
fragBuilder->codeAppend("float d = length(circleEdge.xy);");
fragBuilder->codeAppend("float distanceToOuterEdge = circleEdge.z * (1.0 - d);");
@@ -209,10 +210,14 @@
b->add32(key);
}
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc,
- FPCoordTransformIter&& transformIter) override {
+ void setData(const GrGLSLProgramDataManager&, const GrPrimitiveProcessor&) override {}
+
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLSLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
this->setTransformDataHelper(primProc.cast<CircleGeometryProcessor>().fLocalMatrix,
- pdman, &transformIter);
+ pdman, index, transforms);
}
private:
@@ -314,7 +319,8 @@
gpArgs->fPositionVar,
egp.fInPosition->fName,
egp.fLocalMatrix,
- args.fFPCoordTransformHandler);
+ args.fTransformsIn,
+ args.fTransformsOut);
// for outer curve
fragBuilder->codeAppendf("vec2 scaledOffset = %s*%s.xy;", ellipseOffsets.fsIn(),
@@ -351,10 +357,15 @@
b->add32(key);
}
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc,
- FPCoordTransformIter&& transformIter) override {
- const EllipseGeometryProcessor& egp = primProc.cast<EllipseGeometryProcessor>();
- this->setTransformDataHelper(egp.fLocalMatrix, pdman, &transformIter);
+ 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<EllipseGeometryProcessor>().fLocalMatrix,
+ pdman, index, transforms);
}
private:
@@ -461,7 +472,8 @@
uniformHandler,
gpArgs->fPositionVar,
diegp.fInPosition->fName,
- args.fFPCoordTransformHandler);
+ args.fTransformsIn,
+ args.fTransformsOut);
SkAssertResult(fragBuilder->enableFeature(
GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
@@ -513,8 +525,8 @@
b->add32(key);
}
- void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& gp,
- FPCoordTransformIter&& transformIter) override {
+ void setData(const GrGLSLProgramDataManager& pdman,
+ const GrPrimitiveProcessor& gp) override {
const DIEllipseGeometryProcessor& diegp = gp.cast<DIEllipseGeometryProcessor>();
if (!diegp.fViewMatrix.isIdentity() && !fViewMatrix.cheapEqualTo(diegp.fViewMatrix)) {
@@ -523,7 +535,6 @@
GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
- this->setTransformDataHelper(SkMatrix::I(), pdman, &transformIter);
}
private:
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698