Lines Matching refs:Reporter
31 static void check_data(skiatest::Reporter* reporter, const SkCachedData* data,
33 REPORTER_ASSERT(reporter, data->testing_only_getRefCnt() == refcnt);
34 REPORTER_ASSERT(reporter, data->testing_only_isInCache() == (kInCache == cacheState));
36 REPORTER_ASSERT(reporter, isLocked == (lockedState == kLocked));
39 static void test_mipmapcache(skiatest::Reporter* reporter, SkResourceCache* cache) {
50 REPORTER_ASSERT(reporter, nullptr == mipmap);
53 REPORTER_ASSERT(reporter, mipmap);
58 REPORTER_ASSERT(reporter, mm);
59 REPORTER_ASSERT(reporter, mm == mipmap);
63 check_data(reporter, mipmap, 2, kInCache, kLocked);
68 check_data(reporter, mipmap, 1, kInCache, kNotLocked);
72 check_data(reporter, mipmap, 2, kInCache, kLocked);
75 check_data(reporter, mipmap, 1, kNotInCache, kLocked);
80 static void test_mipmap_notify(skiatest::Reporter* reporter, SkResourceCache* cache) {
97 REPORTER_ASSERT(reporter, mipmap);
104 REPORTER_ASSERT(reporter, !mipmap);
116 static void testBitmapCache_discarded_bitmap(skiatest::Reporter* reporter, SkResourceCache* cache,
118 test_mipmapcache(reporter, cache);
119 test_mipmap_notify(reporter, cache);
122 DEF_TEST(BitmapCache_discarded_bitmap, reporter) {
126 testBitmapCache_discarded_bitmap(reporter, &cache, nullptr);
133 testBitmapCache_discarded_bitmap(reporter, &cache, factory);
137 static void test_discarded_image(skiatest::Reporter* reporter, const SkMatrix& transform,
166 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(desc, &result));
172 DEF_TEST(BitmapCache_discarded_image, reporter) {
187 test_discarded_image(reporter, xforms[i], []() {
193 test_discarded_image(reporter, xforms[i], []() {