Index: src/effects/gradients/SkRadialGradient.cpp |
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp |
index e3aaea341f7ccc8644ebcdf49c6ea8cc19b98ef8..8a378aad09c573d60c4cf41a45d6181e849b99e2 100644 |
--- a/src/effects/gradients/SkRadialGradient.cpp |
+++ b/src/effects/gradients/SkRadialGradient.cpp |
@@ -470,14 +470,14 @@ public: |
virtual void emitCode(GrGLShaderBuilder*, |
const GrDrawEffect&, |
- EffectKey, |
+ const GrEffectKey&, |
const char* outputColor, |
const char* inputColor, |
const TransformedCoordsArray&, |
const TextureSamplerArray&) SK_OVERRIDE; |
- static EffectKey GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) { |
- return GenBaseGradientKey(drawEffect); |
+ static void GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&, GrEffectKeyBuilder* b) { |
+ b->add32(GenBaseGradientKey(drawEffect)); |
} |
private: |
@@ -549,16 +549,17 @@ GrEffect* GrRadialGradient::TestCreate(SkRandom* random, |
void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder, |
const GrDrawEffect&, |
- EffectKey key, |
+ const GrEffectKey& key, |
const char* outputColor, |
const char* inputColor, |
const TransformedCoordsArray& coords, |
const TextureSamplerArray& samplers) { |
- this->emitUniforms(builder, key); |
+ uint32_t baseKey = key.get32(0); |
+ this->emitUniforms(builder, baseKey); |
SkString t("length("); |
t.append(builder->ensureFSCoords2D(coords, 0)); |
t.append(")"); |
- this->emitColor(builder, t.c_str(), key, outputColor, inputColor, samplers); |
+ this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, samplers); |
} |
///////////////////////////////////////////////////////////////////// |