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

Unified Diff: gm/concavepaths.cpp

Issue 2029243002: Tessellator: stop copying vertices into Polys and Monotones. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix style per review Created 4 years, 7 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/gpu/GrTessellator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/concavepaths.cpp
diff --git a/gm/concavepaths.cpp b/gm/concavepaths.cpp
index 4008a6457ecfe83e754f0d49a99ff2f1b0c7a27b..ad87d255ca315a8331589baaca9f1f1afc2249ae 100644
--- a/gm/concavepaths.cpp
+++ b/gm/concavepaths.cpp
@@ -166,6 +166,26 @@ void test_overlapping(SkCanvas* canvas, const SkPaint& paint) {
canvas->restore();
}
+// Two "island" triangles inside a containing rect.
+// This exercises the partnering code in the tessellator.
+void test_partners(SkCanvas* canvas, const SkPaint& paint) {
+ SkPath path;
+ canvas->save();
+ canvas->translate(300, 200);
+ path.moveTo(20, 80);
+ path.lineTo(80, 80);
+ path.lineTo(80, 20);
+ path.lineTo(20, 20);
+ path.moveTo(30, 30);
+ path.lineTo(45, 50);
+ path.lineTo(30, 70);
+ path.moveTo(70, 30);
+ path.lineTo(70, 70);
+ path.lineTo(55, 50);
+ canvas->drawPath(path, paint);
+ canvas->restore();
+}
+
// Monotone test 1 (point in the middle)
void test_monotone_1(SkCanvas* canvas, const SkPaint& paint) {
SkPath path;
@@ -370,6 +390,7 @@ protected:
test_stairstep(canvas, paint);
test_stairstep2(canvas, paint);
test_overlapping(canvas, paint);
+ test_partners(canvas, paint);
test_monotone_1(canvas, paint);
test_monotone_2(canvas, paint);
test_monotone_3(canvas, paint);
« no previous file with comments | « no previous file | src/gpu/GrTessellator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698