Lines Matching +full:- +full:- +full:setup
4 * Use of this source code is governed by a BSD-style license that can be
33 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
34 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
43 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
45 sk_sp<TextureProxy> proxy = proxyCache->findOrCreateCachedProxy(recorder.get(), bitmap, in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
48 REPORTER_ASSERT(r, proxyCache->numCached() == 1); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
52 proxyCache->forceProcessInvalidKeyMsgs(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
54 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
60 std::unique_ptr<Recorder> recorder1 = context->makeRecorder(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
61 ProxyCache* proxyCache1 = recorder1->priv().proxyCache(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
62 std::unique_ptr<Recorder> recorder2 = context->makeRecorder(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
63 ProxyCache* proxyCache2 = recorder2->priv().proxyCache(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
72 REPORTER_ASSERT(r, proxyCache1->numCached() == 0); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
73 REPORTER_ASSERT(r, proxyCache2->numCached() == 0); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
75 sk_sp<TextureProxy> proxy1 = proxyCache1->findOrCreateCachedProxy(recorder1.get(), bitmap, in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
77 sk_sp<TextureProxy> proxy2 = proxyCache2->findOrCreateCachedProxy(recorder2.get(), bitmap, in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
80 REPORTER_ASSERT(r, proxyCache1->numCached() == 1); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
81 REPORTER_ASSERT(r, proxyCache2->numCached() == 1); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
85 proxyCache1->forceProcessInvalidKeyMsgs(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
86 proxyCache2->forceProcessInvalidKeyMsgs(); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
88 REPORTER_ASSERT(r, proxyCache1->numCached() == 0); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
89 REPORTER_ASSERT(r, proxyCache2->numCached() == 0); in DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
112 ProxyCache* proxyCache = recorder->priv().proxyCache(); in setup_test()
114 ProxyCacheSetup setup; in setup_test() local
116 bool success1 = ToolUtils::GetResourceAsBitmap("images/mandrill_32.png", &setup.fBitmap1); in setup_test()
117 bool success2 = ToolUtils::GetResourceAsBitmap("images/mandrill_64.png", &setup.fBitmap2); in setup_test()
122 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in setup_test()
124 setup.fProxy1 = proxyCache->findOrCreateCachedProxy(recorder, setup.fBitmap1, in setup_test()
126 REPORTER_ASSERT(r, proxyCache->numCached() == 1); in setup_test()
130 auto recording = recorder->snap(); in setup_test()
131 context->insertRecording({ recording.get() }); in setup_test()
132 context->submit(SyncToCpu::kYes); in setup_test()
136 setup.fTimeBetweenProxyCreation = skgpu::StdSteadyClock::now(); in setup_test()
139 setup.fProxy2 = proxyCache->findOrCreateCachedProxy(recorder, setup.fBitmap2, in setup_test()
141 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in setup_test()
145 auto recording = recorder->snap(); in setup_test()
146 context->insertRecording({ recording.get() }); in setup_test()
147 testContext->syncedSubmit(context); in setup_test()
151 setup.fTimeAfterAllProxyCreation = skgpu::StdSteadyClock::now(); in setup_test()
154 return setup; in setup_test()
166 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
167 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
169 ProxyCacheSetup setup = setup_test(context, testContext, recorder.get(), r); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS() local
170 REPORTER_ASSERT(r, setup.valid()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
171 if (!setup.valid()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
175 proxyCache->forceFreeUniquelyHeld(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
176 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
178 setup.fProxy1.reset(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
179 proxyCache->forceFreeUniquelyHeld(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
180 REPORTER_ASSERT(r, proxyCache->numCached() == 1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
182 setup.fProxy2.reset(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
183 proxyCache->forceFreeUniquelyHeld(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
184 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
194 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
195 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
197 ProxyCacheSetup setup = setup_test(context, testContext, recorder.get(), r); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS() local
198 REPORTER_ASSERT(r, setup.valid()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
199 if (!setup.valid()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
203 REPORTER_ASSERT(r, !setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
204 REPORTER_ASSERT(r, !setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
206 proxyCache->forcePurgeProxiesNotUsedSince(setup.fTimeBetweenProxyCreation); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
207 REPORTER_ASSERT(r, proxyCache->numCached() == 1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
208 REPORTER_ASSERT(r, setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
209 REPORTER_ASSERT(r, !setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
211 sk_sp<TextureProxy> test = proxyCache->find(setup.fBitmap1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
214 proxyCache->forcePurgeProxiesNotUsedSince(setup.fTimeAfterAllProxyCreation); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
215 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
216 REPORTER_ASSERT(r, setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
217 REPORTER_ASSERT(r, setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
228 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
229 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
231 ProxyCacheSetup setup = setup_test(context, testContext, recorder.get(), r); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS() local
232 REPORTER_ASSERT(r, setup.valid()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
233 if (!setup.valid()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
237 REPORTER_ASSERT(r, !setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
238 REPORTER_ASSERT(r, !setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
241 sk_sp<TextureProxy> test = proxyCache->findOrCreateCachedProxy(recorder.get(), setup.fBitmap1, in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
243 REPORTER_ASSERT(r, test == setup.fProxy1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
248 proxyCache->forcePurgeProxiesNotUsedSince(setup.fTimeBetweenProxyCreation); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
249 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
250 REPORTER_ASSERT(r, !setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
251 REPORTER_ASSERT(r, !setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
253 proxyCache->forcePurgeProxiesNotUsedSince(setup.fTimeAfterAllProxyCreation); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
254 REPORTER_ASSERT(r, proxyCache->numCached() == 1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
255 REPORTER_ASSERT(r, !setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
256 REPORTER_ASSERT(r, setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
258 test = proxyCache->find(setup.fBitmap2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
261 proxyCache->forcePurgeProxiesNotUsedSince(timeAfterProxy1Update); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
262 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
263 REPORTER_ASSERT(r, setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
264 REPORTER_ASSERT(r, setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
274 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
275 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
277 ProxyCacheSetup setup = setup_test(context, testContext, recorder.get(), r); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS() local
278 REPORTER_ASSERT(r, setup.valid()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
279 if (!setup.valid()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
283 REPORTER_ASSERT(r, !setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
284 REPORTER_ASSERT(r, !setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
286 proxyCache->forcePurgeProxiesNotUsedSince(setup.fTimeAfterAllProxyCreation); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
287 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
288 REPORTER_ASSERT(r, setup.fProxy1->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
289 REPORTER_ASSERT(r, setup.fProxy2->texture()->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
299 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
300 ResourceCache* resourceCache = recorder->priv().resourceCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
301 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
303 resourceCache->setMaxBudget(0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
305 ProxyCacheSetup setup = setup_test(context, testContext, recorder.get(), r); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS() local
306 REPORTER_ASSERT(r, setup.valid()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
307 if (!setup.valid()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
311 resourceCache->forcePurgeAsNeeded(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
313 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
315 setup.fProxy1.reset(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
316 proxyCache->forceProcessInvalidKeyMsgs(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
319 sk_sp<TextureProxy> test = proxyCache->find(setup.fBitmap1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
323 resourceCache->forcePurgeAsNeeded(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
325 REPORTER_ASSERT(r, proxyCache->numCached() == 1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
326 test = proxyCache->find(setup.fBitmap1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
329 setup.fProxy2.reset(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
330 proxyCache->forceProcessInvalidKeyMsgs(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
333 test = proxyCache->find(setup.fBitmap2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
337 resourceCache->forcePurgeAsNeeded(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
339 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
350 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
351 ResourceCache* resourceCache = recorder->priv().resourceCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
352 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
354 ProxyCacheSetup setup = setup_test(context, testContext, recorder.get(), r); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS() local
355 REPORTER_ASSERT(r, setup.valid()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
356 if (!setup.valid()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
360 REPORTER_ASSERT(r, setup.fProxy1->isInstantiated()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
361 REPORTER_ASSERT(r, setup.fProxy2->isInstantiated()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
363 if (!setup.fProxy1->texture() || !setup.fProxy2->texture()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
367 // Clear out resources used to setup bitmap proxies so we can track things easier. in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
368 resourceCache->setMaxBudget(0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
369 resourceCache->setMaxBudget(256 * (1 << 20)); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
371 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
372 int baselineResourceCount = resourceCache->getResourceCount(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
374 if (context->priv().caps()->bufferMapsAreAsync()) { in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
381 setup.fProxy2->texture()->refCommandBuffer(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
383 Resource* proxy2ResourcePtr = setup.fProxy2->texture(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
385 setup.fProxy1.reset(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
386 setup.fProxy2.reset(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
387 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
395 resourceCache->purgeResourcesNotUsedSince(timeAfterProxyCreation); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
397 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
398 REPORTER_ASSERT(r, resourceCache->getResourceCount() == baselineResourceCount - 1); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
399 REPORTER_ASSERT(r, resourceCache->topOfPurgeableQueue() == nullptr); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
400 REPORTER_ASSERT(r, proxy2ResourcePtr->testingShouldDeleteASAP()); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
404 proxy2ResourcePtr->unrefCommandBuffer(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
405 resourceCache->forceProcessReturnedResources(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
407 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
408 REPORTER_ASSERT(r, resourceCache->getResourceCount() == baselineResourceCount - 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
409 REPORTER_ASSERT(r, resourceCache->topOfPurgeableQueue() == nullptr); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
427 return recorder->priv().proxyCache()->findOrCreateCachedProxy( in find_or_create_by_key()
431 *params->regenerated = true; in find_or_create_by_key()
434 if (params->id == 1) { in find_or_create_by_key()
452 std::unique_ptr<Recorder> recorder = context->makeRecorder(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
453 ProxyCache* proxyCache = recorder->priv().proxyCache(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
455 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
459 REPORTER_ASSERT(r, proxy1 && proxy1->dimensions().width() == 32); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
463 REPORTER_ASSERT(r, proxy2 && proxy2->dimensions().width() == 64); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
466 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
469 proxyCache->forceFreeUniquelyHeld(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
470 REPORTER_ASSERT(r, proxyCache->numCached() == 2); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
480 (void) recorder->snap(); // Dump pending commands to release internal refs to the cached proxies in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
483 proxyCache->forceFreeUniquelyHeld(); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
484 REPORTER_ASSERT(r, proxyCache->numCached() == 0); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()
488 REPORTER_ASSERT(r, proxy1 && proxy1->dimensions().width() == 32); in DEF_CONDITIONAL_GRAPHITE_TEST_FOR_ALL_CONTEXTS()