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

Unified Diff: gm/dcshader.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 | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | gyp/gpu.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dcshader.cpp
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 25d114fd1493cee67c2baf411d5d249a8de1423e..e53f5ae8a34f088af434d11f9ae761a5fce13e21 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -65,8 +65,8 @@ public:
class DCGLFP : public GrGLSLFragmentProcessor {
void emitCode(EmitArgs& args) override {
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
- fragBuilder->codeAppendf("vec2 c = %s;",
- fragBuilder->ensureFSCoords2D(args.fCoords, 0).c_str());
+ SkString coords2d = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
+ fragBuilder->codeAppendf("vec2 c = %s;", coords2d.c_str());
fragBuilder->codeAppend("vec2 r = mod(c, vec2(20.0));");
fragBuilder->codeAppend("vec4 color = vec4(0.5*sin(c.x / 15.0) + 0.5,"
"0.5*cos((c.x + c.y) / 15.0) + 0.5,"
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698