aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLUniformHandler.h
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2016-02-11 12:49:47 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-11 12:49:47 -0800
commit5e58ceea8569f0d90ff7e3daf5de2def50407212 (patch)
treebbe7f5ff37b6ef7e38830e85e8f4a392ddb75903 /src/gpu/glsl/GrGLSLUniformHandler.h
parentddb64c81fbe05ef7188135564bbd695edea9fdf0 (diff)
Add GrShaderFlags enum
Replaces GrGLSLUniformHandler::ShaderVisibility with GrShaderFlags. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684063006 Review URL: https://codereview.chromium.org/1684063006
Diffstat (limited to 'src/gpu/glsl/GrGLSLUniformHandler.h')
-rw-r--r--src/gpu/glsl/GrGLSLUniformHandler.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gpu/glsl/GrGLSLUniformHandler.h b/src/gpu/glsl/GrGLSLUniformHandler.h
index e72716d04e..14835fbd26 100644
--- a/src/gpu/glsl/GrGLSLUniformHandler.h
+++ b/src/gpu/glsl/GrGLSLUniformHandler.h
@@ -15,19 +15,13 @@ class GrGLSLProgramBuilder;
class GrGLSLUniformHandler {
public:
- enum ShaderVisibility {
- kVertex_Visibility = 1 << kVertex_GrShaderType,
- kGeometry_Visibility = 1 << kGeometry_GrShaderType,
- kFragment_Visibility = 1 << kFragment_GrShaderType,
- };
-
virtual ~GrGLSLUniformHandler() {}
typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
/** 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
- uniform should be accessible. At least one bit must be set. Geometry shader uniforms are not
+ visibility is a bitfield of GrShaderFlag values indicating from which shaders the uniform
+ should be accessible. At least one bit must be set. Geometry shader uniforms are not
supported at this time. The actual uniform name will be mangled. If outName is not nullptr
then it will refer to the final uniform name after return. Use the addUniformArray variant
to add an array of uniforms. */
@@ -70,7 +64,7 @@ private:
int arrayCount,
const char** outName) = 0;
- virtual void appendUniformDecls(ShaderVisibility, SkString*) const = 0;
+ virtual void appendUniformDecls(GrShaderFlags visibility, SkString*) const = 0;
friend class GrGLSLProgramBuilder;
};