Lines Matching refs:Reporter
52 static void compare_bitmaps(skiatest::Reporter* reporter,
55 REPORTER_ASSERT(reporter, b1.empty() == b2.empty());
56 REPORTER_ASSERT(reporter, b1.width() == b2.width());
57 REPORTER_ASSERT(reporter, b1.height() == b2.height());
58 REPORTER_ASSERT(reporter, b1.isNull() == b2.isNull());
61 REPORTER_ASSERT(reporter, b1.isNull() == b2.isNull());
65 REPORTER_ASSERT(reporter, b1.getPixels());
66 REPORTER_ASSERT(reporter, b2.getPixels());
86 REPORTER_ASSERT(reporter, 0 == pixelErrors);
94 static void test_three_encodings(skiatest::Reporter* reporter,
98 REPORTER_ASSERT(reporter, !original.empty());
99 REPORTER_ASSERT(reporter, !original.isNull());
111 REPORTER_ASSERT(reporter, encoded.get() != nullptr);
117 REPORTER_ASSERT(reporter, installSuccess);
121 REPORTER_ASSERT(reporter, nullptr == lazy.getPixels());
124 REPORTER_ASSERT(reporter, lazy.getPixels());
130 REPORTER_ASSERT(reporter, nullptr == lazy.getPixels());
133 REPORTER_ASSERT(reporter, lazy.getPixels());
139 compare_bitmaps(reporter, original, lazy, comparePixels);
154 DEF_TEST(DecodingImageGenerator, reporter) {
155 test_three_encodings(reporter, install_skDiscardablePixelRef);
171 TestImageGenerator(TestType type, skiatest::Reporter* reporter,
173 : INHERITED(GetMyInfo(colorType)), fType(type), fReporter(reporter) {
226 skiatest::Reporter* const fReporter;
231 static void check_test_image_generator_bitmap(skiatest::Reporter* reporter,
233 REPORTER_ASSERT(reporter, TestImageGenerator::Width() == bm.width());
234 REPORTER_ASSERT(reporter, TestImageGenerator::Height() == bm.height());
236 REPORTER_ASSERT(reporter, bm.getPixels());
248 REPORTER_ASSERT(reporter, 0 == errors);
252 skiatest::Reporter* reporter,
255 SkAutoTDelete<SkImageGenerator> gen(new TestImageGenerator(type, reporter, colorType));
256 REPORTER_ASSERT(reporter, gen.get() != nullptr);
260 REPORTER_ASSERT(reporter, success);
262 check_test_image_generator_bitmap(reporter, lazy);
265 REPORTER_ASSERT(reporter, nullptr == lazy.getPixels());
274 DEF_TEST(DiscardableAndCachingPixelRef, reporter) {
281 check_pixelref(TestImageGenerator::kFailGetPixels_TestType, reporter, nullptr,
283 check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType, reporter, nullptr,
288 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
289 check_pixelref(TestImageGenerator::kFailGetPixels_TestType, reporter, pool,
291 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
292 check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType, reporter, pool,
294 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
300 check_pixelref(TestImageGenerator::kFailGetPixels_TestType, reporter, globalPool,
302 check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType, reporter, globalPool,