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); |