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

Unified Diff: tests/PictureTest.cpp

Issue 702733002: Fix PictureTest for new GPU veto (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index ea32805b49eed76c4c63d77c2f7385e712d114ad..1dc37e32edd99f60ea8e7b9cf55d4069cd7b9c22 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -786,7 +786,29 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
}
}
picture.reset(recorder.endRecording());
- // A lot of AA concave paths currently render an SkPicture undesireable for GPU rendering
+ // A lot of small AA concave paths should be fine for GPU rendering
+ REPORTER_ASSERT(reporter, picture->suitableForGpuRasterization(NULL));
+
+ canvas = recorder.beginRecording(100, 100);
+ {
+ SkPath path;
+
+ path.moveTo(0, 0);
+ path.lineTo(0, 100);
+ path.lineTo(50, 50);
+ path.lineTo(100, 100);
+ path.lineTo(100, 0);
+ path.close();
+ REPORTER_ASSERT(reporter, !path.isConvex());
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ for (int i = 0; i < 50; ++i) {
+ canvas->drawPath(path, paint);
+ }
+ }
+ picture.reset(recorder.endRecording());
+ // A lot of large AA concave paths currently render an SkPicture undesireable for GPU rendering
REPORTER_ASSERT(reporter, !picture->suitableForGpuRasterization(NULL));
canvas = recorder.beginRecording(100, 100);
« 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