Lines Matching defs:scratch
370 // Since the resources have neither unique nor scratch keys, delete immediately upon unref.
408 // Create two resource w/ a unique key and two w/o but all of which have scratch keys.
450 // Purge only the two scratch resources
471 // Create two resource w/ scratch keys.
542 // Create a scratch, a unique, and a wrapped resource
543 TestResource* scratch =
570 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() + unique->gpuMemorySize() +
576 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() + unique->gpuMemorySize() ==
583 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() + unique->gpuMemorySize() +
589 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() + unique->gpuMemorySize() ==
598 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() + unique->gpuMemorySize() +
624 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() + wrappedCacheable->gpuMemorySize() +
629 REPORTER_ASSERT(reporter, scratch->gpuMemorySize() == cache->getBudgetedResourceBytes());
632 scratch->unref();
668 TestResource* scratch;
674 scratch = TestResource::CreateScratch(gpu, SkBudgeted::kYes,
677 scratch->unref();
744 // Since this resource is unbudgeted, it should not be reachable as scratch.
756 // Once it is unrefed, it should become available as scratch.
775 // After the second time around, try removing the scratch key
803 // Create two resources that have the same scratch key.
820 // As long as there are outstanding refs on the resources they will not be in the scratch map
835 // Since we removed the refs to the resources they will now be in the scratch map
850 // Create two resources that have the same scratch key.
859 // Ensure that scratch key lookup is correct for negative case.
870 // Find the first resource and remove its scratch key
873 // It's still alive, but not cached by scratch key anymore
908 // Create two resources that have the same scratch key.
917 // Ensure that scratch key comparison and assignment is consistent.
938 // Ensure that scratch key lookup is correct for negative case.
943 // Find the first resource with a scratch key and a copy of a scratch key.
1065 // Add three resources to the cache. Only c is usable as scratch.
1098 // we still have a ref on b, c should be recycled as scratch.
1106 // Make sure we actually get to c via it's scratch key, before we say goodbye.
1109 GrGpuResource* scratch = cache->findAndRefScratchResource(scratchKey);
1110 REPORTER_ASSERT(reporter, scratch == c);
1111 SkSafeUnref(scratch);
1115 scratch = cache->findAndRefScratchResource(scratchKey);
1119 REPORTER_ASSERT(reporter, !scratch);
1120 SkSafeUnref(scratch);
1309 // Do a similar test where we alternate adding scratch and uniquely keyed resources, but
1310 // then purge old scratch resources.
1389 // Add two scratch resources to the cache.