aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-11-05 05:02:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-05 05:02:27 -0800
commit21402e3851454e90329bad52893f29959da086f7 (patch)
tree06923683a74242ca885cf1c667974ea7fd1260db /src/effects
parent9f2251c73ed6f417dd1057d487bf523e04488440 (diff)
Bug fix for cull_line in SkDashPathEffect.
In cull_line we must also check if both points are the same. Otherwise we fail the assert in the else "SkASSERT(dy && !dx)". This is currently blocking the roll as it fails a webkit test. BUG=skia: Review URL: https://codereview.chromium.org/703783002
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkDashPathEffect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp
index a053066191..412965e883 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;
}