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

Unified Diff: src/effects/SkDashPathEffect.cpp

Issue 798093002: improve cull, so we don't create empty segments (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | no next file » | 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 f866ea074e4592871302eecbddb050ba8b3e9279..8cd703f62fa16df323e8ad5daa70ae7372058300 100644
--- a/src/effects/SkDashPathEffect.cpp
+++ b/src/effects/SkDashPathEffect.cpp
@@ -94,7 +94,7 @@ static bool cull_line(SkPoint* pts, const SkStrokeRec& rec,
}
SkASSERT(minX < maxX);
- if (maxX < bounds.fLeft || minX > bounds.fRight) {
+ if (maxX <= bounds.fLeft || minX >= bounds.fRight) {
return false;
}
@@ -125,7 +125,7 @@ static bool cull_line(SkPoint* pts, const SkStrokeRec& rec,
}
SkASSERT(minY < maxY);
- if (maxY < bounds.fTop || minY > bounds.fBottom) {
+ if (maxY <= bounds.fTop || minY >= bounds.fBottom) {
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698