Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index aa8486d3c86684aafa066bc31f2640e4e3bdb6a2..5563a03f7e1d6ad5db84024396749568d4b22b01 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -448,6 +448,7 @@ public: |
EffectKey, |
const char* outputColor, |
const char* inputColor, |
+ const TransformedCoordsArray&, |
const TextureSamplerArray&) SK_OVERRIDE; |
static EffectKey GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) { |
@@ -522,12 +523,10 @@ void GrGLLinearGradient::emitCode(GrGLShaderBuilder* builder, |
EffectKey key, |
const char* outputColor, |
const char* inputColor, |
+ const TransformedCoordsArray& coords, |
const TextureSamplerArray& samplers) { |
this->emitUniforms(builder, key); |
- SkString coords; |
- this->setupMatrix(builder, key, &coords); |
- SkString t; |
- t.append(coords); |
+ SkString t = builder->ensureFSCoords2D(coords, 0); |
t.append(".x"); |
this->emitColor(builder, t.c_str(), key, outputColor, inputColor, samplers); |
} |