Index: src/effects/SkDisplacementMapEffect.cpp |
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
index df4103cf064feab1bfb55152517652f801f4d79d..e74ca4fe3fbe1a3475cb0975f11965c4688bab92 100644 |
--- a/src/effects/SkDisplacementMapEffect.cpp |
+++ b/src/effects/SkDisplacementMapEffect.cpp |
@@ -544,15 +544,15 @@ void GrGLDisplacementMapEffect::emitCode(EmitArgs& args) { |
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; |
fragBuilder->codeAppendf("\t\tvec4 %s = ", dColor); |
- fragBuilder->appendTextureLookup(args.fTexSamplers[0], args.fCoords[0].c_str(), |
- args.fCoords[0].getType()); |
+ fragBuilder->appendTextureLookup(args.fTexSamplers[0], args.fTransformedCoords[0].c_str(), |
+ args.fTransformedCoords[0].getType()); |
fragBuilder->codeAppend(";\n"); |
// Unpremultiply the displacement |
fragBuilder->codeAppendf( |
"\t\t%s.rgb = (%s.a < %s) ? vec3(0.0) : clamp(%s.rgb / %s.a, 0.0, 1.0);", |
dColor, dColor, nearZero, dColor, dColor); |
- SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 1); |
+ SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[1]); |
fragBuilder->codeAppendf("\t\tvec2 %s = %s + %s*(%s.", |
cCoords, coords2D.c_str(), scaleUni, dColor); |