Index: src/effects/SkMagnifierImageFilter.cpp |
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp |
index aa91b1c9804e20f68059e6bf125b048d925a6c9b..f6b70fc524cba6e0dc76fb190cf4fcc07ca90bb9 100644 |
--- a/src/effects/SkMagnifierImageFilter.cpp |
+++ b/src/effects/SkMagnifierImageFilter.cpp |
@@ -127,7 +127,7 @@ void GrGLMagnifierEffect::emitCode(GrGLShaderBuilder* builder, |
const char* outputColor, |
const char* inputColor, |
const TextureSamplerArray& samplers) { |
- const char* coords; |
+ SkString coords; |
fEffectMatrix.emitCodeMakeFSCoords2D(builder, key, &coords); |
fOffsetVar = builder->addUniform( |
GrGLShaderBuilder::kFragment_ShaderType | |
@@ -142,10 +142,10 @@ void GrGLMagnifierEffect::emitCode(GrGLShaderBuilder* builder, |
GrGLShaderBuilder::kVertex_ShaderType, |
kVec2f_GrSLType, "uInset"); |
- builder->fsCodeAppendf("\t\tvec2 coord = %s;\n", coords); |
+ builder->fsCodeAppendf("\t\tvec2 coord = %s;\n", coords.c_str()); |
builder->fsCodeAppendf("\t\tvec2 zoom_coord = %s + %s / %s;\n", |
builder->getUniformCStr(fOffsetVar), |
- coords, |
+ coords.c_str(), |
builder->getUniformCStr(fZoomVar)); |
builder->fsCodeAppend("\t\tvec2 delta = min(coord, vec2(1.0, 1.0) - coord);\n"); |