Index: src/effects/gradients/SkSweepGradient.cpp |
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp |
index bb9d628968f3575d8bb98be299062cbead9cec6b..66e755a1bcdf9a8c695b9f738f63e1dc4b64bbd7 100644 |
--- a/src/effects/gradients/SkSweepGradient.cpp |
+++ b/src/effects/gradients/SkSweepGradient.cpp |
@@ -186,14 +186,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: |
@@ -256,12 +256,13 @@ GrEffect* GrSweepGradient::TestCreate(SkRandom* random, |
void GrGLSweepGradient::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 coords2D = builder->ensureFSCoords2D(coords, 0); |
const GrGLContextInfo ctxInfo = builder->ctxInfo(); |
SkString t; |
@@ -275,8 +276,7 @@ void GrGLSweepGradient::emitCode(GrGLShaderBuilder* builder, |
t.printf("atan(- %s.y, -1.0 * %s.x) * 0.1591549430918 + 0.5", |
coords2D.c_str(), coords2D.c_str()); |
} |
- this->emitColor(builder, t.c_str(), key, |
- outputColor, inputColor, samplers); |
+ this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, samplers); |
} |
///////////////////////////////////////////////////////////////////// |