From: jvanverth Date: Tue, 4 Nov 2014 16:50:15 +0000 (-0800) Subject: Fix PictureTest for new GPU veto X-Git-Tag: submit/tizen/20180928.044319~5052 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d86b07a8ffd852138f6a6a35658ca470aaab322f;p=platform%2Fupstream%2FlibSkiaSharp.git Fix PictureTest for new GPU veto NOTREECHECKS=true Review URL: https://codereview.chromium.org/702733002 --- diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index ea32805b49..1dc37e32ed 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);