Home
last modified time | relevance | path

Searched refs:scratchKey (Results 1 – 8 of 8) sorted by relevance

/external/skqp/tests/
DResourceCacheTest.cpp775 GrScratchKey scratchKey; in test_duplicate_scratch_key() local
776 TestResource::ComputeScratchKey(TestResource::kB_SimulatedProperty, &scratchKey); in test_duplicate_scratch_key()
780 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
794 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
800 SkDEBUGCODE(REPORTER_ASSERT(reporter, 0 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
817 GrScratchKey scratchKey; in test_remove_scratch_key() local
819 TestResource::ComputeScratchKey(TestResource::kA_SimulatedProperty, &scratchKey); in test_remove_scratch_key()
821 …REPORTER_ASSERT(reporter, cache->findAndRefScratchResource(scratchKey, TestResource::kDefaultSize,… in test_remove_scratch_key()
824 TestResource::ComputeScratchKey(TestResource::kB_SimulatedProperty, &scratchKey); in test_remove_scratch_key()
826 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_remove_scratch_key()
[all …]
/external/skia/tests/
DResourceCacheTest.cpp815 GrScratchKey scratchKey; in test_duplicate_scratch_key() local
816 TestResource::ComputeScratchKey(TestResource::kB_SimulatedProperty, &scratchKey); in test_duplicate_scratch_key()
821 SkDEBUGCODE(REPORTER_ASSERT(reporter, 0 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
836 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
842 SkDEBUGCODE(REPORTER_ASSERT(reporter, 0 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
858 GrScratchKey scratchKey; in test_remove_scratch_key() local
860 TestResource::ComputeScratchKey(TestResource::kA_SimulatedProperty, &scratchKey); in test_remove_scratch_key()
862 REPORTER_ASSERT(reporter, !cache->findAndRefScratchResource(scratchKey)); in test_remove_scratch_key()
865 TestResource::ComputeScratchKey(TestResource::kB_SimulatedProperty, &scratchKey); in test_remove_scratch_key()
867 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_remove_scratch_key()
[all …]
/external/skia/src/gpu/
DGrResourceAllocator.cpp109 GrScratchKey scratchKey, in Register() argument
112 , fScratchKey(std::move(scratchKey)) { in Register()
117 if (scratchKey.isValid()) { in Register()
134 if (!this->scratchKey().isValid()) { in isRecyclable()
286 GrScratchKey scratchKey; in findOrCreateRegisterFor() local
287 proxy->priv().computeScratchKey(*fDContext->priv().caps(), &scratchKey); in findOrCreateRegisterFor()
292 if (Register* r = fFreePool.findAndRemove(scratchKey, filter)) { in findOrCreateRegisterFor()
296 return fInternalAllocator.make<Register>(proxy, std::move(scratchKey), resourceProvider); in findOrCreateRegisterFor()
312 fFreePool.insert(r->scratchKey(), r); in expire()
DGrResourceCache.cpp293 GrGpuResource* GrResourceCache::findAndRefScratchResource(const GrScratchKey& scratchKey) { in findAndRefScratchResource() argument
294 SkASSERT(scratchKey.isValid()); in findAndRefScratchResource()
296 GrGpuResource* resource = fScratchMap.find(scratchKey, AvailableForScratchUse()); in findAndRefScratchResource()
298 fScratchMap.remove(scratchKey, resource); in findAndRefScratchResource()
922 const GrScratchKey& scratchKey = resource->resourcePriv().getScratchKey(); in validate() local
930 SkASSERT(fScratchMap->countForKey(scratchKey)); in validate()
932 } else if (scratchKey.isValid()) { in validate()
936 SkASSERT(!fScratchMap->has(resource, scratchKey)); in validate()
DGrResourceCache.h126 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey);
130 int countScratchEntriesForKey(const GrScratchKey& scratchKey) const { in countScratchEntriesForKey() argument
131 return fScratchMap.countForKey(scratchKey); in countScratchEntriesForKey()
DGrResourceAllocator.h129 return r.scratchKey(); in GetKey()
153 const GrScratchKey& scratchKey() const { return fScratchKey; } in scratchKey() function
/external/skqp/src/gpu/
DGrResourceCache.cpp267 GrGpuResource* GrResourceCache::findAndRefScratchResource(const GrScratchKey& scratchKey, in findAndRefScratchResource() argument
270 SkASSERT(scratchKey.isValid()); in findAndRefScratchResource()
274 resource = fScratchMap.find(scratchKey, AvailableForScratchUse(true)); in findAndRefScratchResource()
291 resource = fScratchMap.find(scratchKey, AvailableForScratchUse(false)); in findAndRefScratchResource()
753 const GrScratchKey& scratchKey = resource->resourcePriv().getScratchKey(); in validate() local
759 SkASSERT(fScratchMap->countForKey(scratchKey)); in validate()
761 } else if (scratchKey.isValid()) { in validate()
766 SkASSERT(fScratchMap->countForKey(scratchKey)); in validate()
776 if (scratchKey.isValid()) { in validate()
777 SkASSERT(!fScratchMap->has(resource, scratchKey)); in validate()
DGrResourceCache.h136 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey, size_t resourceSize,
141 int countScratchEntriesForKey(const GrScratchKey& scratchKey) const { in countScratchEntriesForKey() argument
142 return fScratchMap.countForKey(scratchKey); in countScratchEntriesForKey()