From ada90dac10fa804b49cac9d4e8aa036cb587044f Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Wed, 18 Sep 2013 22:14:49 +0000 Subject: "Fix" for hairline corner bugs https://codereview.chromium.org/23708036/ git-svn-id: http://skia.googlecode.com/svn/trunk@11365 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/hairlines.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gm') diff --git a/gm/hairlines.cpp b/gm/hairlines.cpp index 7be4423483..d4d142fa7a 100644 --- a/gm/hairlines.cpp +++ b/gm/hairlines.cpp @@ -104,6 +104,35 @@ protected: SkFloatToScalar(5.f), SkFloatToScalar(1.f)); problem2->close(); } + + // Three paths that show the same bug (missing end caps) + { + // A caret (crbug.com/131770) + SkPath* bug0 = &fPaths.push_back(); + bug0->moveTo(6.5f,5.5f); + bug0->lineTo(3.5f,0.5f); + bug0->moveTo(0.5f,5.5f); + bug0->lineTo(3.5f,0.5f); + } + + { + // An X (crbug.com/137317) + SkPath* bug1 = &fPaths.push_back(); + + bug1->moveTo(1, 1); + bug1->lineTo(6, 6); + bug1->moveTo(1, 6); + bug1->lineTo(6, 1); + } + + { + // A right angle (crbug.com/137465 and crbug.com/256776) + SkPath* bug2 = &fPaths.push_back(); + + bug2->moveTo(5.5f, 5.5f); + bug2->lineTo(5.5f, 0.5f); + bug2->lineTo(0.5f, 0.5f); + } } virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { -- cgit v1.2.3