Lines Matching refs:Reporter
48 static void test_images_are_found_by_willPlayBackBitmaps(skiatest::Reporter* reporter) {
58 REPORTER_ASSERT(reporter, picture->willPlayBackBitmaps());
62 static void test_analysis(skiatest::Reporter* reporter) {
70 REPORTER_ASSERT(reporter, !picture->willPlayBackBitmaps());
83 REPORTER_ASSERT(reporter, paint.getShader()->isAImage());
87 REPORTER_ASSERT(reporter, recorder.finishRecordingAsPicture()->willPlayBackBitmaps());
155 static void test_gpu_veto(skiatest::Reporter* reporter) {
179 REPORTER_ASSERT(reporter,
181 REPORTER_ASSERT(reporter, reason);
193 REPORTER_ASSERT(reporter, !path.isConvex());
203 REPORTER_ASSERT(reporter, SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
215 REPORTER_ASSERT(reporter, !path.isConvex());
225 REPORTER_ASSERT(reporter, !SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
237 REPORTER_ASSERT(reporter, !path.isConvex());
249 REPORTER_ASSERT(reporter, SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
265 REPORTER_ASSERT(reporter, SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
279 REPORTER_ASSERT(reporter, !SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
295 REPORTER_ASSERT(reporter, SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
307 REPORTER_ASSERT(reporter, !SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
315 REPORTER_ASSERT(reporter, !SkPictureGpuAnalyzer(picture).suitableForGpuRasterization());
366 void check_save_state(skiatest::Reporter* reporter, SkPicture* picture,
376 REPORTER_ASSERT(reporter, numSaves >= canvas.getSaveCount());
377 REPORTER_ASSERT(reporter, numSaveLayers >= canvas.getSaveLayerCount());
378 REPORTER_ASSERT(reporter, numRestores >= canvas.getRestoreCount());
410 static void check_balance(skiatest::Reporter* reporter, SkPicture* picture) {
423 REPORTER_ASSERT(reporter, beforeSaveCount == canvas.getSaveCount());
424 REPORTER_ASSERT(reporter, beforeMatrix == canvas.getTotalMatrix());
428 REPORTER_ASSERT(reporter, afterClip == beforeClip);
432 DEF_TEST(PictureRecorder_replay, reporter) {
444 check_save_state(reporter, copy.get(), 2, 1, 3);
450 check_save_state(reporter, final.get(), 1, 2, 3);
453 check_save_state(reporter, copy.get(), 2, 1, 3);
469 REPORTER_ASSERT(reporter, !copy->willPlayBackBitmaps());
478 REPORTER_ASSERT(reporter, final->willPlayBackBitmaps());
480 REPORTER_ASSERT(reporter, copy->uniqueID() != final->uniqueID());
483 REPORTER_ASSERT(reporter, !copy->willPlayBackBitmaps());
496 check_balance(reporter, copy.get());
498 REPORTER_ASSERT(reporter, expectedSaveCount = canvas->getSaveCount());
506 static void test_unbalanced_save_restores(skiatest::Reporter* reporter) {
510 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
529 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
550 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
562 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
563 REPORTER_ASSERT(reporter, testCanvas.getTotalMatrix().isIdentity());
618 static void test_clip_bound_opt(skiatest::Reporter* reporter) {
642 REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
643 REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
644 REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
645 REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
652 REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
653 REPORTER_ASSERT(reporter, 7 == clipBounds.fTop);
654 REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
655 REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
662 REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
663 REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
664 REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
665 REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
671 REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
672 REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
673 REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
674 REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
683 REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
684 REPORTER_ASSERT(reporter, 7 == clipBounds.fTop);
685 REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
686 REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
693 REPORTER_ASSERT(reporter, 6 == clipBounds.fLeft);
694 REPORTER_ASSERT(reporter, 6 == clipBounds.fTop);
695 REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
696 REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
700 static void test_cull_rect_reset(skiatest::Reporter* reporter) {
711 REPORTER_ASSERT(reporter, picture);
714 REPORTER_ASSERT(reporter, 0 == finalCullRect.fLeft);
715 REPORTER_ASSERT(reporter, 0 == finalCullRect.fTop);
716 REPORTER_ASSERT(reporter, 100 == finalCullRect.fBottom);
717 REPORTER_ASSERT(reporter, 100 == finalCullRect.fRight);
721 REPORTER_ASSERT(reporter, 0 == bbhCullRect.fLeft);
722 REPORTER_ASSERT(reporter, 0 == bbhCullRect.fTop);
723 REPORTER_ASSERT(reporter, 100 == bbhCullRect.fBottom);
724 REPORTER_ASSERT(reporter, 100 == bbhCullRect.fRight);
766 static void test_clip_expansion(skiatest::Reporter* reporter) {
783 REPORTER_ASSERT(reporter, testCanvas.getClipCount() == 2);
786 static void test_hierarchical(skiatest::Reporter* reporter) {
794 REPORTER_ASSERT(reporter, !childPlain->willPlayBackBitmaps()); // 0
798 REPORTER_ASSERT(reporter, childWithBitmap->willPlayBackBitmaps()); // 1
804 REPORTER_ASSERT(reporter, !parentPP->willPlayBackBitmaps()); // 0
810 REPORTER_ASSERT(reporter, parentPWB->willPlayBackBitmaps()); // 1
817 REPORTER_ASSERT(reporter, parentWBP->willPlayBackBitmaps()); // 1
824 REPORTER_ASSERT(reporter, parentWBWB->willPlayBackBitmaps()); // 2
828 static void test_gen_id(skiatest::Reporter* reporter) {
835 REPORTER_ASSERT(reporter, empty->uniqueID() != SK_InvalidGenID);
841 REPORTER_ASSERT(reporter, hasData->uniqueID() != SK_InvalidGenID);
844 REPORTER_ASSERT(reporter, hasData->uniqueID() != empty->uniqueID());
847 static void test_typeface(skiatest::Reporter* reporter) {
859 DEF_TEST(Picture, reporter) {
860 test_typeface(reporter);
867 test_unbalanced_save_restores(reporter);
870 test_gpu_veto(reporter);
872 test_images_are_found_by_willPlayBackBitmaps(reporter);
873 test_analysis(reporter);
874 test_clip_bound_opt(reporter);
875 test_clip_expansion(reporter);
876 test_hierarchical(reporter);
877 test_gen_id(reporter);
878 test_cull_rect_reset(reporter);
919 DEF_TEST(DontOptimizeSaveLayerDrawDrawRestore, reporter) {
963 REPORTER_ASSERT(reporter, replayBM.getColor(30, 30) == 0xff000080);
964 REPORTER_ASSERT(reporter, replayBM.getColor(55, 55) == 0xff800000);