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

Unified Diff: gm/strokerect.cpp

Issue 2060543002: fix non-square stroke rects (non-aa) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months 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 | src/core/SkScan_Hairline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/strokerect.cpp
diff --git a/gm/strokerect.cpp b/gm/strokerect.cpp
index f7e36057dff838a91a05f4c288d36d1267da0260..a1c8bb8d9ad07372a03cda7dc9812240e3199180 100644
--- a/gm/strokerect.cpp
+++ b/gm/strokerect.cpp
@@ -110,7 +110,20 @@ protected:
private:
typedef GM INHERITED;
};
+DEF_GM(return new StrokeRectGM;)
///////////////////////////////////////////////////////////////////////////////////////////////////
-DEF_GM(return new StrokeRectGM;)
+/*
+ * Exercise rect-stroking (which is specialized from paths) when the resulting stroke-width is
+ * non-square. See https://bugs.chromium.org/p/skia/issues/detail?id=5408
+ */
+DEF_SIMPLE_GM(strokerect_anisotropic_5408, canvas, 200, 50) {
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(6);
+
+ canvas->scale(10, 1);
+ SkRect r = SkRect::MakeXYWH(5, 20, 10, 10);
+ canvas->drawRect(r, p);
+}
« no previous file with comments | « no previous file | src/core/SkScan_Hairline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698