Home | History | Annotate | Download | only in core

Lines Matching refs:SkResourceCache

13 #include "SkResourceCache.h"
19 DECLARE_SKMESSAGEBUS_MESSAGE(SkResourceCache::PurgeSharedIDMessage)
32 void SkResourceCache::Key::init(void* nameSpace, uint64_t sharedID, size_t dataSize) {
56 class SkResourceCache::Hash :
57 public SkTDynamicHash<SkResourceCache::Rec, SkResourceCache::Key> {};
62 void SkResourceCache::init() {
160 SkResourceCacheDiscardableAllocator(SkResourceCache::DiscardableFactory factory) {
168 SkResourceCache::DiscardableFactory fFactory;
198 SkResourceCache::SkResourceCache(DiscardableFactory factory) {
205 SkResourceCache::SkResourceCache(size_t byteLimit) {
210 SkResourceCache::~SkResourceCache() {
224 bool SkResourceCache::find(const Key& key, FindVisitor visitor, void* context) {
252 void SkResourceCache::add(Rec* rec) {
278 void SkResourceCache::remove(Rec* rec) {
299 void SkResourceCache::purgeAsNeeded(bool forcePurge) {
330 void SkResourceCache::purgeSharedID(uint64_t sharedID) {
364 void SkResourceCache::visitAll(Visitor visitor, void* context) {
376 size_t SkResourceCache::setTotalByteLimit(size_t newLimit) {
385 SkCachedData* SkResourceCache::newCachedData(size_t bytes) {
398 void SkResourceCache::detach(Rec* rec) {
418 void SkResourceCache::moveToHead(Rec* rec) {
437 void SkResourceCache::addToHead(Rec* rec) {
458 void SkResourceCache::validate() const {
502 void SkResourceCache::dump() const {
505 SkDebugf("SkResourceCache: count=%d bytes=%d %s\n",
509 size_t SkResourceCache::setSingleAllocationByteLimit(size_t newLimit) {
515 size_t SkResourceCache::getSingleAllocationByteLimit() const {
519 size_t SkResourceCache::getEffectiveSingleAllocationByteLimit() const {
535 void SkResourceCache::checkMessages() {
546 static SkResourceCache* gResourceCache = nullptr;
558 static SkResourceCache* get_cache() {
563 gResourceCache = new SkResourceCache(SkDiscardableMemory::Create);
565 gResourceCache = new SkResourceCache(SK_DEFAULT_IMAGE_CACHE_LIMIT);
572 size_t SkResourceCache::GetTotalBytesUsed() {
577 size_t SkResourceCache::GetTotalByteLimit() {
582 size_t SkResourceCache::SetTotalByteLimit(size_t newLimit) {
587 SkResourceCache::DiscardableFactory SkResourceCache::GetDiscardableFactory() {
592 SkBitmap::Allocator* SkResourceCache::GetAllocator() {
597 SkCachedData* SkResourceCache::NewCachedData(size_t bytes) {
602 void SkResourceCache::Dump() {
607 size_t SkResourceCache
612 size_t SkResourceCache::GetSingleAllocationByteLimit() {
617 size_t SkResourceCache::GetEffectiveSingleAllocationByteLimit() {
622 void SkResourceCache::PurgeAll() {
627 bool SkResourceCache::Find(const Key& key, FindVisitor visitor, void* context) {
632 void SkResourceCache::Add(Rec* rec) {
637 void SkResourceCache::VisitAll(Visitor visitor, void* context) {
642 void SkResourceCache::PostPurgeSharedID(uint64_t sharedID) {
654 return SkResourceCache::GetTotalBytesUsed();
658 return SkResourceCache::GetTotalByteLimit();
662 return SkResourceCache::SetTotalByteLimit(newLimit);
666 return SkResourceCache::GetSingleAllocationByteLimit();
670 return SkResourceCache::SetSingleAllocationByteLimit(newLimit);
675 return SkResourceCache::PurgeAll();
680 static void dump_visitor(const SkResourceCache::Rec& rec, void*) {
685 void SkResourceCache::TestDumpMemoryStatistics() {
689 static void sk_trace_dump_visitor(const SkResourceCache::Rec& rec, void* context) {
705 void SkResourceCache::DumpMemoryStatistics(SkTraceMemoryDump* dump) {