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

Unified Diff: src/gpu/GrPathProcessor.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 | « no previous file | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathProcessor.cpp
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index cb33010f7e7dec60e685a184169dcaca72d34ff5..1d70dea289548612dbbecf56596f5e74ac9205ad 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -22,13 +22,18 @@ public:
const GrGLSLCaps&,
GrProcessorKeyBuilder* b) {
b->add32(SkToInt(pathProc.overrides().readsColor()) |
- SkToInt(pathProc.overrides().readsCoverage()) << 16);
+ (SkToInt(pathProc.overrides().readsCoverage()) << 1) |
+ (SkToInt(pathProc.viewMatrix().hasPerspective()) << 2));
}
void emitCode(EmitArgs& args) override {
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
const GrPathProcessor& pathProc = args.fGP.cast<GrPathProcessor>();
+ if (!pathProc.viewMatrix().hasPerspective()) {
+ args.fVaryingHandler->setNoPerspective();
+ }
+
// emit transforms
this->emitTransforms(args.fVaryingHandler, args.fTransformsIn, args.fTransformsOut);
« no previous file with comments | « no previous file | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698