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

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

Issue 611653002: Cleanup of shader building system (Closed) Base URL: https://skia.googlesource.com/skia.git@solo_gp
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/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.h b/src/gpu/gl/builders/GrGLShaderBuilder.h
index e99fcce7478d4058164af1a44954f3ac1a32e559..cf7ae9b53d21f081b6452b312b7d546625c80c71 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.h
@@ -9,21 +9,12 @@
#define GrGLShaderBuilder_DEFINED
#include "gl/GrGLProgramDesc.h"
-#include "gl/GrGLProgramEffects.h"
-#include "gl/GrGLSL.h"
#include "gl/GrGLProgramDataManager.h"
-#include "GrBackendProcessorFactory.h"
-#include "GrColor.h"
-#include "GrProcessor.h"
-#include "SkTypes.h"
#include <stdarg.h>
class GrGLContextInfo;
-class GrProcessorStage;
-class GrGLProgramDesc;
class GrGLProgramBuilder;
-class GrGLFullProgramBuilder;
/**
base class for all shaders builders
@@ -32,6 +23,7 @@ class GrGLShaderBuilder {
public:
typedef GrGLProcessor::TransformedCoordsArray TransformedCoordsArray;
typedef GrGLProcessor::TextureSampler TextureSampler;
+
GrGLShaderBuilder(GrGLProgramBuilder* program);
void addInput(GrGLShaderVar i) { fInputs.push_back(i); }
@@ -112,7 +104,7 @@ public:
GrGLProgramBuilder* getProgramBuilder() { return fProgramBuilder; }
/**
- * Helper for begining and ending a block in the fragment code.
+ * Helper for begining and ending a block in the shader code.
*/
class ShaderBlock {
public:
@@ -127,7 +119,10 @@ public:
private:
GrGLShaderBuilder* fBuilder;
};
+
protected:
+ typedef GrTAllocator<GrGLShaderVar> VarArray;
+ void appendDecls(const VarArray& vars, SkString* out) const;
/*
* this super low level function is just for use internally to builders
@@ -142,8 +137,6 @@ protected:
*/
void addFeature(uint32_t featureBit, const char* extensionName);
- typedef GrTAllocator<GrGLShaderVar> VarArray;
-
GrGLProgramBuilder* fProgramBuilder;
SkString fCode;
@@ -154,21 +147,4 @@ protected:
VarArray fOutputs;
uint32_t fFeaturesAddedMask;
};
-
-
-/*
- * Full Shader builder is the base class for shaders which are only accessible through full program
- * builder, ie vertex, geometry, and later TCU / TES. Using this base class, they can access the
- * full program builder functionality through the full program pointer
- */
-class GrGLFullShaderBuilder : public GrGLShaderBuilder {
-public:
- GrGLFullShaderBuilder(GrGLFullProgramBuilder* program);
-
- GrGLFullProgramBuilder* fullProgramBuilder() { return fFullProgramBuilder; }
-protected:
- GrGLFullProgramBuilder* fFullProgramBuilder;
-private:
- typedef GrGLShaderBuilder INHERITED;
-};
#endif
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698