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

Unified Diff: src/gpu/GrAALinearizingConvexPathRenderer.cpp

Issue 1302503003: Fix transformed stroke width in GrAALinearizingConvexPathRenderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/GrAAConvexTessellator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAALinearizingConvexPathRenderer.cpp
diff --git a/src/gpu/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/GrAALinearizingConvexPathRenderer.cpp
index fc72a8f60f1a78751db69ba0f182e24205dcce00..899c6b1ef1acb9ae856dcf5c535f7618c17df91a 100644
--- a/src/gpu/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/GrAALinearizingConvexPathRenderer.cpp
@@ -50,8 +50,11 @@ bool GrAALinearizingConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& arg
return false;
}
if (args.fStroke->getStyle() == SkStrokeRec::kStroke_Style) {
- return args.fViewMatrix->isSimilarity() && args.fStroke->getWidth() >= 1.0f &&
- args.fStroke->getWidth() <= kMaxStrokeWidth && !args.fStroke->isDashed() &&
+ if (!args.fViewMatrix->isSimilarity()) {
+ return false;
+ }
+ SkScalar strokeWidth = args.fViewMatrix->getMaxScale() * args.fStroke->getWidth();
+ return strokeWidth >= 1.0f && strokeWidth <= kMaxStrokeWidth && !args.fStroke->isDashed() &&
SkPathPriv::LastVerbIsClose(*args.fPath) &&
args.fStroke->getJoin() != SkPaint::Join::kRound_Join;
}
« no previous file with comments | « src/gpu/GrAAConvexTessellator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698