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

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

Issue 1438003003: Move all ShaderBuilder files to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@glslProgBuild
Patch Set: nits Created 5 years, 1 month 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/glsl/GrGLSLGeometryShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('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 f783a40db43e03203dafee8f469d7e03861688a5..568fe8ae10c04f982519611d23a982447a53aa53 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -10,14 +10,17 @@
#include "GrGeometryProcessor.h"
#include "GrGpu.h"
-#include "gl/builders/GrGLFragmentShaderBuilder.h"
-#include "gl/builders/GrGLGeometryShaderBuilder.h"
-#include "gl/builders/GrGLVertexShaderBuilder.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
+#include "glsl/GrGLSLGeometryShaderBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLVertexShaderBuilder.h"
class GrGLSLCaps;
class GrGLSLShaderVar;
+// Enough precision to represent 1 / 2048 accurately in printf
+#define GR_SIGNIFICANT_POW2_DECIMAL_DIG 11
+
class GrGLSLUniformBuilder {
public:
enum ShaderVisibility {
@@ -111,10 +114,10 @@ private:
const char* fGsOut;
const char* fFsIn;
- friend class GrGLVertexBuilder;
- friend class GrGLGeometryBuilder;
- friend class GrGLXferBuilder;
- friend class GrGLFragmentShaderBuilder;
+ friend class GrGLSLVertexBuilder;
+ friend class GrGLSLGeometryBuilder;
+ friend class GrGLSLXferBuilder;
+ friend class GrGLSLFragmentShaderBuilder;
};
struct GrGLSLVertToFrag : public GrGLSLVarying {
@@ -163,8 +166,8 @@ public:
GrSLPrecision fsPrecision = kDefault_GrSLPrecision) = 0;
// TODO rename getFragmentBuilder
- virtual GrGLFragmentBuilder* getFragmentShaderBuilder() = 0;
- virtual GrGLVertexBuilder* getVertexShaderBuilder() = 0;
+ virtual GrGLSLFragmentBuilder* getFragmentShaderBuilder() = 0;
+ virtual GrGLSLVertexBuilder* getVertexShaderBuilder() = 0;
/*
* *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
@@ -175,7 +178,7 @@ public:
/* a specializations for FPs. Lets the user add uniforms and FS code */
class GrGLSLFPBuilder : public virtual GrGLSLUniformBuilder {
public:
- virtual GrGLFragmentBuilder* getFragmentShaderBuilder() = 0;
+ virtual GrGLSLFragmentBuilder* getFragmentShaderBuilder() = 0;
/*
* *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
@@ -185,7 +188,7 @@ public:
/* a specializations for XPs. Lets the user add uniforms and FS code */
class GrGLSLXPBuilder : public virtual GrGLSLUniformBuilder {
public:
- virtual GrGLXPFragmentBuilder* getFragmentShaderBuilder() = 0;
+ virtual GrGLSLXPFragmentBuilder* getFragmentShaderBuilder() = 0;
/*
* *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
@@ -198,8 +201,8 @@ class GrGLSLProgramBuilder : public GrGLSLGPBuilder,
public:
typedef GrGpu::DrawArgs DrawArgs;
- GrGLXPFragmentBuilder* getFragmentShaderBuilder() override { return &fFS; }
- GrGLVertexBuilder* getVertexShaderBuilder() override { return &fVS; }
+ GrGLSLXPFragmentBuilder* getFragmentShaderBuilder() override { return &fFS; }
+ GrGLSLVertexBuilder* getVertexShaderBuilder() override { return &fVS; }
// Handles for program uniforms (other than per-effect uniforms)
struct BuiltinUniformHandles {
@@ -240,9 +243,9 @@ protected:
// number of each input/output type in a single allocation block, used by many builders
static const int kVarsPerBlock;
- GrGLVertexBuilder fVS;
- GrGLGeometryBuilder fGS;
- GrGLFragmentShaderBuilder fFS;
+ GrGLSLVertexBuilder fVS;
+ GrGLSLGeometryBuilder fGS;
+ GrGLSLFragmentShaderBuilder fFS;
int fStageIndex;
BuiltinUniformHandles fUniformHandles;
@@ -252,10 +255,10 @@ protected:
private:
virtual void onAppendUniformDecls(ShaderVisibility visibility, SkString* out) const = 0;
- friend class GrGLShaderBuilder;
- friend class GrGLVertexBuilder;
- friend class GrGLFragmentShaderBuilder;
- friend class GrGLGeometryBuilder;
+ friend class GrGLSLShaderBuilder;
+ friend class GrGLSLVertexBuilder;
+ friend class GrGLSLFragmentShaderBuilder;
+ friend class GrGLSLGeometryBuilder;
};
#endif
« no previous file with comments | « src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698