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

Unified Diff: gm/pathfill.cpp

Issue 1755683002: add gm for distance field bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pathfill.cpp
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp
index a524588241a481e85c386319da38673c1db5742e..1e88fedc0e2b406726ba950cd7e2b90068e8adab 100644
--- a/gm/pathfill.cpp
+++ b/gm/pathfill.cpp
@@ -213,6 +213,28 @@ private:
typedef skiagm::GM INHERITED;
};
+DEF_SIMPLE_GM(rotatedcubicpath, canvas, 200, 200) {
+ SkPaint p;
+ p.setAntiAlias(true);
+ p.setStyle(SkPaint::kFill_Style);
+
+ canvas->translate(50, 50);
+ SkPath path;
+ path.moveTo(48,-23);
+ path.cubicTo(48,-29.5, 6,-30, 6,-30);
+ path.cubicTo(6,-30, 2,0, 2,0);
+ path.cubicTo(2,0, 44,-21.5, 48,-23);
+ path.close();
+
+ p.setColor(SK_ColorBLUE);
+ canvas->drawPath(path, p);
+
+ // Rotated path, which is not antialiased on GPU
+ p.setColor(SK_ColorRED);
+ canvas->rotate(90);
+ canvas->drawPath(path, p);
+}
+
///////////////////////////////////////////////////////////////////////////////
DEF_GM( return new PathFillGM; )
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698