Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index 332c9b4af92e5717f8ec5d8d24f2c5fc5ef9eeb6..9de459125a7639dd85404df19e1c55dea4f1679f 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -461,14 +461,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: |
@@ -538,15 +538,16 @@ GrEffect* GrLinearGradient::TestCreate(SkRandom* random, |
void GrGLLinearGradient::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 = builder->ensureFSCoords2D(coords, 0); |
t.append(".x"); |
- this->emitColor(builder, t.c_str(), key, outputColor, inputColor, samplers); |
+ this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, samplers); |
} |
///////////////////////////////////////////////////////////////////// |