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

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

Issue 635533005: Revert of 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 cf7ae9b53d21f081b6452b312b7d546625c80c71..e99fcce7478d4058164af1a44954f3ac1a32e559 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.h
@@ -9,12 +9,21 @@
#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
@@ -23,7 +32,6 @@
public:
typedef GrGLProcessor::TransformedCoordsArray TransformedCoordsArray;
typedef GrGLProcessor::TextureSampler TextureSampler;
-
GrGLShaderBuilder(GrGLProgramBuilder* program);
void addInput(GrGLShaderVar i) { fInputs.push_back(i); }
@@ -104,7 +112,7 @@
GrGLProgramBuilder* getProgramBuilder() { return fProgramBuilder; }
/**
- * Helper for begining and ending a block in the shader code.
+ * Helper for begining and ending a block in the fragment code.
*/
class ShaderBlock {
public:
@@ -119,10 +127,7 @@
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
@@ -137,6 +142,8 @@
*/
void addFeature(uint32_t featureBit, const char* extensionName);
+ typedef GrTAllocator<GrGLShaderVar> VarArray;
+
GrGLProgramBuilder* fProgramBuilder;
SkString fCode;
@@ -147,4 +154,21 @@
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