Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 2324663004: Remove unneeded GrGLSLTransformedCoordsArray type (Closed)
Patch Set: update comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/GrAlphaThresholdFragmentProcessor.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/effects/GrAlphaThresholdFragmentProcessor.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698