| Index: src/gpu/gl/builders/GrGLProgramBuilder.h
|
| diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h
|
| index 4cfe0286d8f0829f7f57b7b68bdb972e97a46be2..4b784aceea0aefc90d042626ed46aeaf3e0a9b50 100644
|
| --- a/src/gpu/gl/builders/GrGLProgramBuilder.h
|
| +++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
|
| @@ -12,6 +12,7 @@
|
| #include "GrGLGeometryShaderBuilder.h"
|
| #include "GrGLVertexShaderBuilder.h"
|
| #include "../GrGLProgramDataManager.h"
|
| +#include "../GrGLPathProgramDataManager.h"
|
| #include "../GrGLUniformHandle.h"
|
| #include "../GrGLPrimitiveProcessor.h"
|
| #include "../GrGLXferProcessor.h"
|
| @@ -39,6 +40,7 @@ public:
|
| virtual ~GrGLUniformBuilder() {}
|
|
|
| typedef GrGLProgramDataManager::UniformHandle UniformHandle;
|
| + typedef GrGLPathProgramDataManager::SeparableVaryingHandle SeparableVaryingHandle;
|
|
|
| /** Add a uniform variable to the current program, that has visibility in one or more shaders.
|
| visibility is a bitfield of ShaderVisibility values indicating from which shaders the
|
| @@ -154,6 +156,13 @@ public:
|
| virtual void addPassThroughAttribute(const GrGeometryProcessor::Attribute*,
|
| const char* output) = 0;
|
|
|
| + /*
|
| + * Creates a fragment shader varying that can be referred to.
|
| + * Comparable to GrGLUniformBuilder::addUniform().
|
| + */
|
| + virtual SeparableVaryingHandle addSeparableVarying(
|
| + const char* name, GrGLVertToFrag*, GrSLPrecision fsPrecision = kDefault_GrSLPrecision) = 0;
|
| +
|
| // TODO rename getFragmentBuilder
|
| virtual GrGLFragmentBuilder* getFragmentShaderBuilder() = 0;
|
| virtual GrGLVertexBuilder* getVertexShaderBuilder() = 0;
|
| @@ -252,6 +261,10 @@ public:
|
| void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*,
|
| const char* output) override;
|
|
|
| + SeparableVaryingHandle addSeparableVarying(
|
| + const char* name,
|
| + GrGLVertToFrag*,
|
| + GrSLPrecision fsPrecision = kDefault_GrSLPrecision) override;
|
|
|
| // Handles for program uniforms (other than per-effect uniforms)
|
| struct BuiltinUniformHandles {
|
| @@ -315,9 +328,9 @@ protected:
|
| GrGLInstalledProc<Proc>*);
|
|
|
| GrGLProgram* finalize();
|
| - void bindUniformLocations(GrGLuint programID);
|
| + void bindProgramResourceLocations(GrGLuint programID);
|
| bool checkLinkStatus(GrGLuint programID);
|
| - void resolveUniformLocations(GrGLuint programID);
|
| + virtual void resolveProgramResourceLocations(GrGLuint programID);
|
| void cleanupProgram(GrGLuint programID, const SkTDArray<GrGLuint>& shaderIDs);
|
| void cleanupShaders(const SkTDArray<GrGLuint>& shaderIDs);
|
|
|
|
|