Lines Matching defs:cache
64 static bool cache_non_scratch_resources_equals(GrResourceCache* cache, int expected) {
67 cache->getStats(&stats);
82 // The cache needs to be big enough that nothing gets flushed, or our expectations can be wrong
84 GrResourceCache* cache = dContext->priv().getResourceCache();
96 // Initially, cache only has the render target context
97 REPORTER_ASSERT(reporter, cache_non_scratch_resources_equals(cache, 0));
102 REPORTER_ASSERT(reporter, cache_non_scratch_resources_equals(cache, expected));
105 cache->purgeAsNeeded();
106 REPORTER_ASSERT(reporter, cache_non_scratch_resources_equals(cache, expected));
108 // Reset the path to change the GenID, which should invalidate one resource in the cache.
109 // Some path renderers may leave other unique-keyed resources in the cache, though.
111 cache->purgeAsNeeded();
112 REPORTER_ASSERT(reporter, cache_non_scratch_resources_equals(cache, expected - 1));
118 // Test that purging the cache of masks also removes listeners from the path.
127 cache->purgeUnlockedResources();