Index: src/effects/gradients/SkSweepGradient.cpp |
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp |
index f975a1887ead036816bd2f190fd36cb8f76a6c5e..2af20b0bf6ce84b12350df9a4966df2a1be051b6 100644 |
--- a/src/effects/gradients/SkSweepGradient.cpp |
+++ b/src/effects/gradients/SkSweepGradient.cpp |
@@ -473,10 +473,10 @@ void GrGLSweepGradient::emitCode(GrGLShaderBuilder* builder, |
const char* inputColor, |
const TextureSamplerArray& samplers) { |
this->emitYCoordUniform(builder); |
- const char* coords; |
+ SkString coords; |
this->setupMatrix(builder, key, &coords); |
SkString t; |
- t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5", coords, coords); |
+ 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]); |
} |