Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index 3f581ff2a137a29f1327ea4ca0ae04fecfc80fa1..5ad998ed95ddac559a5b4d5443756ac5196b2091 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); |
} |
///////////////////////////////////////////////////////////////////// |