Home
last modified time | relevance | path

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

/third_party/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 …]
/third_party/flutter/skia/tests/
DResourceCacheTest.cpp773 GrScratchKey scratchKey; in test_duplicate_scratch_key() local
774 TestResource::ComputeScratchKey(TestResource::kB_SimulatedProperty, &scratchKey); in test_duplicate_scratch_key()
778 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
792 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
798 SkDEBUGCODE(REPORTER_ASSERT(reporter, 0 == cache->countScratchEntriesForKey(scratchKey));) in test_duplicate_scratch_key()
815 GrScratchKey scratchKey; in test_remove_scratch_key() local
817 TestResource::ComputeScratchKey(TestResource::kA_SimulatedProperty, &scratchKey); in test_remove_scratch_key()
819 …REPORTER_ASSERT(reporter, cache->findAndRefScratchResource(scratchKey, TestResource::kDefaultSize,… in test_remove_scratch_key()
822 TestResource::ComputeScratchKey(TestResource::kB_SimulatedProperty, &scratchKey); in test_remove_scratch_key()
824 SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->countScratchEntriesForKey(scratchKey));) in test_remove_scratch_key()
[all …]
/third_party/skia/src/gpu/
DGrResourceAllocator.cpp117 GrScratchKey scratchKey, in Register() argument
120 , fScratchKey(std::move(scratchKey)) { in Register()
125 if (scratchKey.isValid()) { in Register()
143 if (!this->scratchKey().isValid()) { in isRecyclable()
295 GrScratchKey scratchKey; in findOrCreateRegisterFor() local
296 proxy->priv().computeScratchKey(*fDContext->priv().caps(), &scratchKey); in findOrCreateRegisterFor()
301 if (Register* r = fFreePool.findAndRemove(scratchKey, filter)) { in findOrCreateRegisterFor()
305 return fInternalAllocator.make<Register>(proxy, std::move(scratchKey), resourceProvider); in findOrCreateRegisterFor()
321 fFreePool.insert(r->scratchKey(), r); in expire()
DGrResourceCache.h148 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey);
152 int countScratchEntriesForKey(const GrScratchKey& scratchKey) const { in countScratchEntriesForKey() argument
153 return fScratchMap.countForKey(scratchKey); in countScratchEntriesForKey()
DGrResourceCache.cpp355 GrGpuResource* GrResourceCache::findAndRefScratchResource(const GrScratchKey& scratchKey) { in findAndRefScratchResource() argument
356 SkASSERT(scratchKey.isValid()); in findAndRefScratchResource()
358 GrGpuResource* resource = fScratchMap.find(scratchKey, AvailableForScratchUse()); in findAndRefScratchResource()
360 fScratchMap.remove(scratchKey, resource); in findAndRefScratchResource()
1066 const GrScratchKey& scratchKey = resource->resourcePriv().getScratchKey(); in validate() local
1074 SkASSERT(fScratchMap->countForKey(scratchKey)); in validate()
1076 } else if (scratchKey.isValid()) { in validate()
1080 SkASSERT(!fScratchMap->has(resource, scratchKey)); in validate()
DGrResourceAllocator.h138 return r.scratchKey(); in GetKey()
162 const GrScratchKey& scratchKey() const { return fScratchKey; } in scratchKey() function
/third_party/flutter/skia/src/gpu/
DGrResourceCache.cpp390 GrGpuResource* GrResourceCache::findAndRefScratchResource(const GrScratchKey& scratchKey, in findAndRefScratchResource() argument
393 SkASSERT(scratchKey.isValid()); in findAndRefScratchResource()
397 resource = fScratchMap.find(scratchKey, AvailableForScratchUse(true)); in findAndRefScratchResource()
414 resource = fScratchMap.find(scratchKey, AvailableForScratchUse(false)); in findAndRefScratchResource()
974 const GrScratchKey& scratchKey = resource->resourcePriv().getScratchKey(); in validate() local
980 SkASSERT(fScratchMap->countForKey(scratchKey)); in validate()
982 } else if (scratchKey.isValid()) { in validate()
987 SkASSERT(fScratchMap->countForKey(scratchKey)); in validate()
997 if (scratchKey.isValid()) { in validate()
998 SkASSERT(!fScratchMap->has(resource, scratchKey)); in validate()
DGrResourceCache.h154 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey, size_t resourceSize,
159 int countScratchEntriesForKey(const GrScratchKey& scratchKey) const { in countScratchEntriesForKey() argument
160 return fScratchMap.countForKey(scratchKey); in countScratchEntriesForKey()