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

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

Issue 1462123003: Create GrGLSLVaryingHandler class for program building (Closed) Base URL: https://skia.googlesource.com/skia.git@putCapsOnArgs
Patch Set: fix release builder 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/gl/GrGLVaryingHandler.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 3a8dcd8500a8eff7e4ee1f8ae1245ee4e728c9b5..edc467c40785a1bdc4a10160f97efe6f0e577aea 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
@@ -10,6 +10,7 @@
#include "GrPipeline.h"
#include "gl/GrGLProgramDataManager.h"
+#include "gl/GrGLVaryingHandler.h"
#include "glsl/GrGLSLPrimitiveProcessor.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -69,24 +70,9 @@ public:
GrGLGpu* gpu() const { return fGpu; }
- void addVarying(
- const char* name,
- GrGLSLVarying*,
- GrSLPrecision precision = kDefault_GrSLPrecision) override;
-
- void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*,
- const char* output) override;
-
- SeparableVaryingHandle addSeparableVarying(
- const char* name,
- GrGLSLVertToFrag*,
- GrSLPrecision fsPrecision = kDefault_GrSLPrecision) override;
-
private:
typedef GrGLProgramDataManager::UniformInfo UniformInfo;
typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray;
- typedef GrGLProgramDataManager::SeparableVaryingInfo SeparableVaryingInfo;
- typedef GrGLProgramDataManager::SeparableVaryingInfoArray SeparableVaryingInfoArray;
GrGLProgramBuilder(GrGLGpu*, const DrawArgs&);
@@ -148,6 +134,8 @@ private:
void onAppendUniformDecls(ShaderVisibility visibility, SkString* out) const override;
+ GrGLSLVaryingHandler* varyingHandler() override { return &fVaryingHandler; }
+
// reset is called by program creator between each processor's emit code. It increments the
// stage offset for variable name mangling, and also ensures verfication variables in the
// fragment shader are cleared.
@@ -179,13 +167,11 @@ private:
GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
SkTArray<UniformHandle> fSamplerUniforms;
- SeparableVaryingInfoArray fSeparableVaryingInfos;
- friend class GrGLSLShaderBuilder;
- friend class GrGLSLVertexBuilder;
- friend class GrGLSLFragmentShaderBuilder;
- friend class GrGLSLGeometryBuilder;
+ GrGLVaryingHandler fVaryingHandler;
+
+ friend class GrGLVaryingHandler;
- typedef GrGLSLProgramBuilder INHERITED;
+ typedef GrGLSLProgramBuilder INHERITED;
};
#endif
« no previous file with comments | « src/gpu/gl/GrGLVaryingHandler.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698