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

Unified Diff: src/gpu/glsl/GrGLSLGeometryProcessor.cpp

Issue 1673093002: Use noperspective interpolation for 2D draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fName -> fVsOut Created 4 years, 10 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/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLGeometryProcessor.cpp
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
index b8951be551add38532e41b02f6e970dec80cef1c..f7dba820a0542ea8bd43603445f80d81f5d83b14 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -19,6 +19,9 @@ void GrGLSLGeometryProcessor::emitCode(EmitArgs& args) {
GrGPArgs gpArgs;
this->onEmitCode(args, &gpArgs);
vBuilder->transformToNormalizedDeviceSpace(gpArgs.fPositionVar);
+ if (kVec2f_GrSLType == gpArgs.fPositionVar.getType()) {
+ args.fVaryingHandler->setNoPerspective();
+ }
}
void GrGLSLGeometryProcessor::emitTransforms(GrGLSLVertexBuilder* vb,
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698