aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkLinearGradient.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-11-25 14:21:55 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-25 14:21:55 -0800
commit60030bc2e1d9de455eb4ab2351ae0be494c97b4e (patch)
tree20a2fe40bcd3d700cc79b7133f57e9d32a40a637 /src/effects/gradients/SkLinearGradient.cpp
parentf3ca41c723f3a33a766de64a1cda9a01bab20142 (diff)
remove one place we read from gpu key in effects
Diffstat (limited to 'src/effects/gradients/SkLinearGradient.cpp')
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 3f581ff2a1..5ad998ed95 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -551,17 +551,17 @@ GrFragmentProcessor* GrLinearGradient::TestCreate(SkRandom* random,
/////////////////////////////////////////////////////////////////////
void GrGLLinearGradient::emitCode(GrGLFPBuilder* builder,
- const GrFragmentProcessor&,
+ const GrFragmentProcessor& fp,
const GrProcessorKey& key,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray& coords,
const TextureSamplerArray& samplers) {
- uint32_t baseKey = key.get32(0);
- this->emitUniforms(builder, baseKey);
+ const GrGradientEffect& ge = fp.cast<GrGradientEffect>();
+ this->emitUniforms(builder, ge);
SkString t = builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0);
t.append(".x");
- this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, samplers);
+ this->emitColor(builder, ge, t.c_str(), outputColor, inputColor, samplers);
}
/////////////////////////////////////////////////////////////////////