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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 666693012: GP Emit Code takes a struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index d5bc3073634a502d1686962e459967689109dae7..ef4a17107e76004a4e69c4e5e38bb0f495791e38 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -528,17 +528,11 @@ public:
GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
: INHERITED (factory) {}
- virtual void emitCode(GrGLGPBuilder* builder,
- const GrGeometryProcessor& geometryProcessor,
- const GrProcessorKey& key,
- const char* outputColor,
- const char* inputColor,
- const TransformedCoordsArray&,
- const TextureSamplerArray& samplers) SK_OVERRIDE {
+ virtual void emitCode(const EmitArgs& args) SK_OVERRIDE {
const char *vsName, *fsName;
- builder->addVarying(kVec4f_GrSLType, "QuadEdge", &vsName, &fsName);
+ args.fPB->addVarying(kVec4f_GrSLType, "QuadEdge", &vsName, &fsName);
- GrGLGPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder();
SkAssertResult(fsBuilder->enableFeature(
GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
@@ -561,11 +555,11 @@ public:
"clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);\n\t\t}\n");
- fsBuilder->codeAppendf("\t%s = %s;\n", outputColor,
- (GrGLSLExpr4(inputColor) * GrGLSLExpr1("edgeAlpha")).c_str());
+ fsBuilder->codeAppendf("\t%s = %s;\n", args.fOutput,
+ (GrGLSLExpr4(args.fInput) * GrGLSLExpr1("edgeAlpha")).c_str());
- const GrShaderVar& inQuadEdge = geometryProcessor.cast<QuadEdgeEffect>().inQuadEdge();
- GrGLVertexBuilder* vsBuilder = builder->getVertexShaderBuilder();
+ const GrShaderVar& inQuadEdge = args.fGP.cast<QuadEdgeEffect>().inQuadEdge();
+ GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder();
vsBuilder->codeAppendf("\t%s = %s;\n", vsName, inQuadEdge.c_str());
}
« no previous file with comments | « no previous file | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698