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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.h

Issue 815643005: Move program descriptor and primitive processor off of optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix Created 5 years, 11 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/GrGLProgramDesc.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/builders/GrGLProgramBuilder.h
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h
index ddca6e600841578b9a2d821aeff801296acf1877..612791e07807e5dbbabb5b3740e2f7563f98322e 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
@@ -219,6 +219,7 @@ class GrGLProgramBuilder : public GrGLGPBuilder,
public GrGLFPBuilder,
public GrGLXPBuilder {
public:
+ typedef GrGpu::DrawArgs DrawArgs;
/** Generates a shader program.
*
* The program implements what is specified in the stages given as input.
@@ -226,7 +227,7 @@ public:
* to be used.
* @return true if generation was successful.
*/
- static GrGLProgram* CreateProgram(const GrOptDrawState&, GrGLGpu*);
+ static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*);
UniformHandle addUniformArray(uint32_t visibility,
GrSLType type,
@@ -277,13 +278,15 @@ protected:
typedef GrGLProgramDataManager::UniformInfo UniformInfo;
typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray;
- static GrGLProgramBuilder* CreateProgramBuilder(const GrOptDrawState&, GrGLGpu*);
+ static GrGLProgramBuilder* CreateProgramBuilder(const DrawArgs&, GrGLGpu*);
- GrGLProgramBuilder(GrGLGpu*, const GrOptDrawState&);
+ GrGLProgramBuilder(GrGLGpu*, const DrawArgs&);
- const GrOptDrawState& optState() const { return fOptState; }
- const GrProgramDesc& desc() const { return fDesc; }
- const GrProgramDesc::KeyHeader& header() const { return fDesc.header(); }
+ const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrimitiveProcessor; }
+ const GrOptDrawState& optState() const { return *fArgs.fOptState; }
+ const GrProgramDesc& desc() const { return *fArgs.fDesc; }
+ const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; }
+ const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(); }
// Generates a name for a variable. The generated string will be name prefixed by the prefix
// char (unless the prefix is '\0'). It also mangles the name to be stage-specific if we're
@@ -383,8 +386,7 @@ protected:
GrGLInstalledXferProc* fXferProcessor;
SkAutoTUnref<GrGLInstalledFragProcs> fFragmentProcessors;
- const GrOptDrawState& fOptState;
- const GrProgramDesc& fDesc;
+ const DrawArgs& fArgs;
GrGLGpu* fGpu;
UniformInfoArray fUniforms;
GrGLPrimitiveProcessor::TransformsIn fCoordTransforms;
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698