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

Unified Diff: src/gpu/glsl/GrGLSLProgramBuilder.h

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 9 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/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLProgramBuilder.h
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index 83c004da98d0c4cab0e80ff3156574766c31f742..67d1eb653b4833b9738f10c1a0ea3285b788803d 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -27,7 +27,6 @@ typedef SkSTArray<8, GrGLSLFragmentProcessor*, true> GrGLSLFragProcs;
class GrGLSLProgramBuilder {
public:
- typedef GrGpu::DrawArgs DrawArgs;
typedef GrGLSLUniformHandler::UniformHandle UniformHandle;
virtual ~GrGLSLProgramBuilder() {}
@@ -35,10 +34,10 @@ public:
virtual const GrCaps* caps() const = 0;
virtual const GrGLSLCaps* glslCaps() const = 0;
- const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrimitiveProcessor; }
- const GrPipeline& pipeline() const { return *fArgs.fPipeline; }
- const GrProgramDesc& desc() const { return *fArgs.fDesc; }
- const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(); }
+ const GrPrimitiveProcessor& primitiveProcessor() const { return fPrimProc; }
+ const GrPipeline& pipeline() const { return fPipeline; }
+ const GrProgramDesc& desc() const { return fDesc; }
+ const GrProgramDesc::KeyHeader& header() const { return fDesc.header(); }
void appendUniformDecls(GrShaderFlags visibility, SkString*) const;
@@ -82,7 +81,9 @@ public:
int fStageIndex;
- const DrawArgs& fArgs;
+ const GrPipeline& fPipeline;
+ const GrPrimitiveProcessor& fPrimProc;
+ const GrProgramDesc& fDesc;
BuiltinUniformHandles fUniformHandles;
@@ -91,7 +92,9 @@ public:
GrGLSLFragProcs fFragmentProcessors;
protected:
- explicit GrGLSLProgramBuilder(const DrawArgs& args);
+ explicit GrGLSLProgramBuilder(const GrPipeline&,
+ const GrPrimitiveProcessor&,
+ const GrProgramDesc&);
void addFeature(GrShaderFlags shaders, uint32_t featureBit, const char* extensionName);
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698