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

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.h

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 | « src/gpu/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGeometryProcessor.h
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h
index e50f5987f2b1651acbbd3ae2afbcbdcec8e05bba..b61535e098199a867b5962fa07fa1442e45a46ed 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.h
+++ b/src/gpu/gl/GrGLGeometryProcessor.h
@@ -22,17 +22,26 @@ public:
GrGLGeometryProcessor(const GrBackendProcessorFactory& factory)
: INHERITED(factory) {}
+ struct EmitArgs {
+ EmitArgs(GrGLGPBuilder* pb,
+ const GrGeometryProcessor& gp,
+ const GrProcessorKey& key,
+ const char* output,
+ const char* input,
+ const TextureSamplerArray& samplers)
+ : fPB(pb), fGP(gp), fKey(key), fOutput(output), fInput(input), fSamplers(samplers) {}
+ GrGLGPBuilder* fPB;
+ const GrGeometryProcessor& fGP;
+ const GrProcessorKey& fKey;
+ const char* fOutput;
+ const char* fInput;
+ const TextureSamplerArray& fSamplers;
+ };
/**
* This is similar to emitCode() in the base class, except it takes a full shader builder.
* This allows the effect subclass to emit vertex code.
*/
- virtual void emitCode(GrGLGPBuilder* builder,
- const GrGeometryProcessor& geometryProcessor,
- const GrProcessorKey& key,
- const char* outputColor,
- const char* inputColor,
- const TransformedCoordsArray& coords,
- const TextureSamplerArray& samplers) = 0;
+ virtual void emitCode(const EmitArgs&) = 0;
private:
typedef GrGLProcessor INHERITED;
« no previous file with comments | « src/gpu/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698