aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-11 15:03:31 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-11 15:03:31 +0000
commiteb715c8d5caa2191d611c4f9cfb22b4afc6c8d02 (patch)
treefef8a29dadf8c8c76ccf166ea045bd047abc811a /src/gpu/effects
parentf3ccda7d4f54a149487dfe96e2cc7c2d7f28502b (diff)
VariableVisibility -> ShaderType
Review URL: http://codereview.appspot.com/6344103/ git-svn-id: http://skia.googlecode.com/svn/trunk@4534 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrConvolutionEffect.cpp11
-rw-r--r--src/gpu/effects/GrGradientEffects.cpp20
-rw-r--r--src/gpu/effects/GrMorphologyEffect.cpp6
3 files changed, 16 insertions, 21 deletions
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 349c8672b3..42dc2b49f1 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -60,12 +60,11 @@ GrGLConvolutionEffect::GrGLConvolutionEffect(const GrProgramStageFactory& factor
void GrGLConvolutionEffect::setupVariables(GrGLShaderBuilder* state,
int stage) {
- fImageIncrementVar = &state->addUniform(
- GrGLShaderBuilder::kBoth_VariableLifetime,
- kVec2f_GrSLType, "uImageIncrement", stage);
- fKernelVar = &state->addUniform(
- GrGLShaderBuilder::kFragment_VariableLifetime,
- kFloat_GrSLType, "uKernel", stage, this->width());
+ fImageIncrementVar = &state->addUniform(GrGLShaderBuilder::kFragment_ShaderType |
+ GrGLShaderBuilder::kVertex_ShaderType,
+ kVec2f_GrSLType, "uImageIncrement", stage);
+ fKernelVar = &state->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
+ kFloat_GrSLType, "uKernel", stage, this->width());
fImageIncrementLocation = kUseUniform;
fKernelLocation = kUseUniform;
diff --git a/src/gpu/effects/GrGradientEffects.cpp b/src/gpu/effects/GrGradientEffects.cpp
index 9d7596574b..604595692d 100644
--- a/src/gpu/effects/GrGradientEffects.cpp
+++ b/src/gpu/effects/GrGradientEffects.cpp
@@ -142,12 +142,10 @@ void GrGLRadial2Gradient::setupVariables(GrGLShaderBuilder* state, int stage) {
// 2 copies of uniform array, 1 for each of vertex & fragment shader,
// to work around Xoom bug. Doesn't seem to cause performance decrease
// in test apps, but need to keep an eye on it.
- fVSParamVar = &state->addUniform(
- GrGLShaderBuilder::kVertex_VariableLifetime,
- kFloat_GrSLType, "uRadial2VSParams", stage, 6);
- fFSParamVar = &state->addUniform(
- GrGLShaderBuilder::kFragment_VariableLifetime,
- kFloat_GrSLType, "uRadial2FSParams", stage, 6);
+ fVSParamVar = &state->addUniform(GrGLShaderBuilder::kVertex_ShaderType,
+ kFloat_GrSLType, "uRadial2VSParams", stage, 6);
+ fFSParamVar = &state->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
+ kFloat_GrSLType, "uRadial2FSParams", stage, 6);
fVSParamLocation = GrGLProgramStage::kUseUniform;
fFSParamLocation = GrGLProgramStage::kUseUniform;
@@ -399,12 +397,10 @@ void GrGLConical2Gradient::setupVariables(GrGLShaderBuilder* state, int stage) {
// 2 copies of uniform array, 1 for each of vertex & fragment shader,
// to work around Xoom bug. Doesn't seem to cause performance decrease
// in test apps, but need to keep an eye on it.
- fVSParamVar = &state->addUniform(
- GrGLShaderBuilder::kVertex_VariableLifetime,
- kFloat_GrSLType, "uConical2VSParams", stage, 6);
- fFSParamVar = &state->addUniform(
- GrGLShaderBuilder::kFragment_VariableLifetime,
- kFloat_GrSLType, "uConical2FSParams", stage, 6);
+ fVSParamVar = &state->addUniform(GrGLShaderBuilder::kVertex_ShaderType,
+ kFloat_GrSLType, "uConical2VSParams", stage, 6);
+ fFSParamVar = &state->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
+ kFloat_GrSLType, "uConical2FSParams", stage, 6);
fVSParamLocation = GrGLProgramStage::kUseUniform;
fFSParamLocation = GrGLProgramStage::kUseUniform;
diff --git a/src/gpu/effects/GrMorphologyEffect.cpp b/src/gpu/effects/GrMorphologyEffect.cpp
index 40c1300bfe..43e870285f 100644
--- a/src/gpu/effects/GrMorphologyEffect.cpp
+++ b/src/gpu/effects/GrMorphologyEffect.cpp
@@ -57,9 +57,9 @@ GrGLMorphologyEffect ::GrGLMorphologyEffect(const GrProgramStageFactory& factory
}
void GrGLMorphologyEffect::setupVariables(GrGLShaderBuilder* state, int stage) {
- fImageIncrementVar = &state->addUniform(
- GrGLShaderBuilder::kBoth_VariableLifetime,
- kVec2f_GrSLType, "uImageIncrement", stage);
+ fImageIncrementVar = &state->addUniform(GrGLShaderBuilder::kFragment_ShaderType |
+ GrGLShaderBuilder::kVertex_ShaderType,
+ kVec2f_GrSLType, "uImageIncrement", stage);
}
void GrGLMorphologyEffect::emitVS(GrGLShaderBuilder* state,