Index: src/effects/gradients/SkSweepGradient.cpp |
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp |
index 2af20b0bf6ce84b12350df9a4966df2a1be051b6..350b20aaee22c8b59292b1ff53ed7a517cedd85c 100644 |
--- a/src/effects/gradients/SkSweepGradient.cpp |
+++ b/src/effects/gradients/SkSweepGradient.cpp |
@@ -405,7 +405,7 @@ public: |
const TextureSamplerArray&) SK_OVERRIDE; |
static EffectKey GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) { |
- return GenMatrixKey(drawEffect); |
+ return GenBaseGradientKey(drawEffect); |
} |
private: |
@@ -472,12 +472,13 @@ void GrGLSweepGradient::emitCode(GrGLShaderBuilder* builder, |
const char* outputColor, |
const char* inputColor, |
const TextureSamplerArray& samplers) { |
- this->emitYCoordUniform(builder); |
+ this->emitUniforms(builder, key); |
SkString coords; |
this->setupMatrix(builder, key, &coords); |
SkString t; |
t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5", coords.c_str(), coords.c_str()); |
- this->emitColorLookup(builder, t.c_str(), outputColor, inputColor, samplers[0]); |
+ this->emitColor(builder, t.c_str(), key, |
+ outputColor, inputColor, samplers); |
} |
///////////////////////////////////////////////////////////////////// |