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

Unified Diff: tests/PictureTest.cpp

Issue 875913002: Alter gpu veto (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix PictureTest Created 5 years, 11 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 | « src/core/SkPicture.cpp ('k') | 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 b63b35eea701fe98893c5eccdf178df950280e03..c9860f994c1f4d7cdac4247f3feeba085b98dbca 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -140,7 +140,9 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
paint.setStyle(SkPaint::kStroke_Style);
paint.setPathEffect(dash);
- canvas->drawPath(path, paint);
+ for (int i = 0; i < 50; ++i) {
+ canvas->drawPath(path, paint);
+ }
}
SkAutoTUnref<SkPicture> picture(recorder.endRecording());
// path effects currently render an SkPicture undesireable for GPU rendering
@@ -225,7 +227,10 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
paint.setPathEffect(pe)->unref();
SkPoint points [2] = { { 0, 0 }, { 100, 0 } };
- canvas->drawPoints(SkCanvas::kLines_PointMode, 2, points, paint);
+
+ for (int i = 0; i < 50; ++i) {
+ canvas->drawPoints(SkCanvas::kLines_PointMode, 2, points, paint);
+ }
}
picture.reset(recorder.endRecording());
// fast-path dashed effects are fine for GPU rendering ...
@@ -238,7 +243,9 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25);
paint.setPathEffect(pe)->unref();
- canvas->drawRect(SkRect::MakeWH(10, 10), paint);
+ for (int i = 0; i < 50; ++i) {
+ canvas->drawRect(SkRect::MakeWH(10, 10), paint);
+ }
}
picture.reset(recorder.endRecording());
// ... but only when applied to drawPoint() calls
« no previous file with comments | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698