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

Unified Diff: gm/dashing.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 | « expectations/gm/ignored-tests.txt ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dashing.cpp
diff --git a/gm/dashing.cpp b/gm/dashing.cpp
index d6c1c97df9c81ba4177117a02f3a6f72d6718b97..7e32bfaf90a7adfeea6c26662a2116e602e84147 100644
--- a/gm/dashing.cpp
+++ b/gm/dashing.cpp
@@ -34,6 +34,16 @@ static void show_giant_dash(SkCanvas* canvas) {
drawline(canvas, 1, 1, paint, SkIntToScalar(20 * 1000));
}
+static void show_zero_len_dash(SkCanvas* canvas) {
+ SkPaint paint;
+
+ drawline(canvas, 2, 2, paint, SkIntToScalar(0));
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(SkIntToScalar(2));
+ canvas->translate(0, SkIntToScalar(20));
+ drawline(canvas, 4, 4, paint, SkIntToScalar(0));
+}
+
class DashingGM : public skiagm::GM {
public:
DashingGM() {}
@@ -81,6 +91,8 @@ protected:
}
show_giant_dash(canvas);
+ canvas->translate(0, SkIntToScalar(20));
+ show_zero_len_dash(canvas);
}
};
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698