Lines Matching refs:Reporter
32 static void check_data(skiatest::Reporter* reporter, const SkCachedData* data,
34 REPORTER_ASSERT(reporter, data->testing_only_getRefCnt() == refcnt);
35 REPORTER_ASSERT(reporter, data->testing_only_isInCache() == (kInCache == cacheState));
37 REPORTER_ASSERT(reporter, isLocked == (lockedState == kLocked));
40 static void test_mipmapcache(skiatest::Reporter* reporter, SkResourceCache* cache) {
51 REPORTER_ASSERT(reporter, nullptr == mipmap);
54 REPORTER_ASSERT(reporter, mipmap);
59 REPORTER_ASSERT(reporter, mm);
60 REPORTER_ASSERT(reporter, mm == mipmap);
64 check_data(reporter, mipmap, 2, kInCache, kLocked);
69 check_data(reporter, mipmap, 1, kInCache, kNotLocked);
73 check_data(reporter, mipmap, 2, kInCache, kLocked);
76 check_data(reporter, mipmap, 1, kNotInCache, kLocked);
81 static void test_mipmap_notify(skiatest::Reporter* reporter, SkResourceCache* cache) {
98 REPORTER_ASSERT(reporter, mipmap);
105 REPORTER_ASSERT(reporter, !mipmap);
117 static void testBitmapCache_discarded_bitmap(skiatest::Reporter* reporter, SkResourceCache* cache,
119 test_mipmapcache(reporter, cache);
120 test_mipmap_notify(reporter, cache);
123 DEF_TEST(BitmapCache_discarded_bitmap, reporter) {
127 testBitmapCache_discarded_bitmap(reporter, &cache, nullptr);
134 testBitmapCache_discarded_bitmap(reporter, &cache, factory);
138 static void test_discarded_image(skiatest::Reporter* reporter, const SkMatrix& transform,
167 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(desc, &result));
173 DEF_TEST(BitmapCache_discarded_image, reporter) {
188 test_discarded_image(reporter, xforms[i], []() {
194 test_discarded_image(reporter, xforms[i], []() {
240 static void test_duplicate_add(SkResourceCache* cache, skiatest::Reporter* reporter,
254 REPORTER_ASSERT(reporter, !(flags0 & TestRec::kDidInstall));
255 REPORTER_ASSERT(reporter, !(flags1 & TestRec::kDidInstall));
258 REPORTER_ASSERT(reporter, flags0 & TestRec::kDidInstall);
259 REPORTER_ASSERT(reporter, !(flags1 & TestRec::kDidInstall));
265 REPORTER_ASSERT(reporter, !(flags0 & TestRec::kDidInstall));
266 REPORTER_ASSERT(reporter, flags1 & TestRec::kDidInstall);
269 REPORTER_ASSERT(reporter, flags0 & TestRec::kDidInstall);
270 REPORTER_ASSERT(reporter, !(flags1 & TestRec::kDidInstall));
278 DEF_TEST(ResourceCache_purge, reporter) {
282 test_duplicate_add(&cache, reporter, purgable);
286 test_duplicate_add(&cache, reporter, purgable);