Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index 33dd2e6ce8b21601d099ebd43c9cda4d69befbbf..6d15d4e2db80896772dc2e2346a218aac36b3540 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -324,7 +324,7 @@ void GrGLMorphologyEffect::emitCode(GrGLShaderBuilder* builder, |
const char* outputColor, |
const char* inputColor, |
const TextureSamplerArray& samplers) { |
- const char* coords; |
+ SkString coords; |
fEffectMatrix.emitCodeMakeFSCoords2D(builder, key, &coords); |
fImageIncrementUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType, |
kVec2f_GrSLType, "ImageIncrement"); |
@@ -346,7 +346,7 @@ void GrGLMorphologyEffect::emitCode(GrGLShaderBuilder* builder, |
} |
const char* imgInc = builder->getUniformCStr(fImageIncrementUni); |
- builder->fsCodeAppendf("\t\tvec2 coord = %s - %d.0 * %s;\n", coords, fRadius, imgInc); |
+ builder->fsCodeAppendf("\t\tvec2 coord = %s - %d.0 * %s;\n", coords.c_str(), fRadius, imgInc); |
builder->fsCodeAppendf("\t\tfor (int i = 0; i < %d; i++) {\n", this->width()); |
builder->fsCodeAppendf("\t\t\t%s = %s(%s, ", outputColor, func, outputColor); |
builder->appendTextureLookup(GrGLShaderBuilder::kFragment_ShaderType, samplers[0], "coord"); |