diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-09 17:17:51 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-09 17:17:51 +0000 |
commit | 683001ce0de70c859ea5e5353245b18cadbefc45 (patch) | |
tree | 1273ab16c136560717f603186052087a81de2055 /gm | |
parent | b1af07aa43698d23b791617a070ad825436b4026 (diff) |
[PDF] Ensure that filling single line paths (with no area) does not draw anything.
Add a test to a gm to confirm the new behavior.
Fixes http://crbug.com/123072
Review URL: https://codereview.appspot.com/6137060
git-svn-id: http://skia.googlecode.com/svn/trunk@3884 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/pathfill.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp index 9d4b3c8701..6da507da34 100644 --- a/gm/pathfill.cpp +++ b/gm/pathfill.cpp @@ -92,6 +92,18 @@ static SkScalar make_star(SkPath* path, int n) { static SkScalar make_star_5(SkPath* path) { return make_star(path, 5); } static SkScalar make_star_13(SkPath* path) { return make_star(path, 13); } +// We don't expect any output from this path. +static SkScalar make_line(SkPath* path) { + path->moveTo(SkIntToScalar(30), SkIntToScalar(30)); + path->lineTo(SkIntToScalar(120), SkIntToScalar(40)); + path->close(); + path->moveTo(SkIntToScalar(150), SkIntToScalar(30)); + path->lineTo(SkIntToScalar(150), SkIntToScalar(30)); + path->lineTo(SkIntToScalar(300), SkIntToScalar(40)); + path->close(); + return SkIntToScalar(40); +} + static const MakePathProc gProcs[] = { make_frame, make_triangle, @@ -99,7 +111,8 @@ static const MakePathProc gProcs[] = { make_oval, make_sawtooth, make_star_5, - make_star_13 + make_star_13, + make_line, }; #define N SK_ARRAY_COUNT(gProcs) |