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

Unified Diff: src/effects/SkDashPathEffect.cpp

Issue 703783002: Bug fix for cull_line in SkDashPathEffect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test cases to dashing gm Created 6 years, 1 month 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 | « gm/dashing.cpp ('k') | src/utils/SkDashPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDashPathEffect.cpp
diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp
index a053066191e955add6f6b8525a19ebc1c5c90b7e..412965e88356edb7da257046e3fea10995d9fda2 100644
--- a/src/effects/SkDashPathEffect.cpp
+++ b/src/effects/SkDashPathEffect.cpp
@@ -66,7 +66,7 @@ static bool cull_line(SkPoint* pts, const SkStrokeRec& rec,
SkScalar dx = pts[1].x() - pts[0].x();
SkScalar dy = pts[1].y() - pts[0].y();
- if (dx && dy) {
+ if ((dx && dy) || (!dx && !dy)) {
return false;
}
« no previous file with comments | « gm/dashing.cpp ('k') | src/utils/SkDashPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698