Lines Matching defs:SkScaledImageCache
8 #include "SkScaledImageCache.h"
24 static inline SkScaledImageCache::ID* rec_to_id(SkScaledImageCache::Rec* rec) {
25 return reinterpret_cast<SkScaledImageCache::ID*>(rec);
28 static inline SkScaledImageCache::Rec* id_to_rec(SkScaledImageCache::ID* id) {
29 return reinterpret_cast<SkScaledImageCache::Rec*>(id);
58 struct SkScaledImageCache::Key {
102 struct SkScaledImageCache::Rec {
140 class SkScaledImageCache::Hash :
141 public SkTDynamicHash<SkScaledImageCache::Rec, SkScaledImageCache::Key> {};
150 static inline SkScaledImageCache::Rec* find_rec_in_list(
151 SkScaledImageCache::Rec* head, const Key & key) {
152 SkScaledImageCache::Rec* rec = head;
160 void SkScaledImageCache::init() {
256 SkScaledImageCache::DiscardableFactory factory) {
264 SkScaledImageCache::DiscardableFactory fFactory;
292 SkScaledImageCache::SkScaledImageCache(DiscardableFactory factory) {
299 SkScaledImageCache::SkScaledImageCache(size_t byteLimit) {
304 SkScaledImageCache::~SkScaledImageCache() {
319 SkScaledImageCache::Rec* SkScaledImageCache::findAndLock(uint32_t genID,
330 SkScaledImageCache::Rec* SkScaledImageCache::findAndLock(const SkScaledImageCache::Key& key) {
360 SkScaledImageCache::ID* SkScaledImageCache::findAndLock(uint32_t genID,
374 SkScaledImageCache::ID* SkScaledImageCache::findAndLock(const SkBitmap& orig,
392 SkScaledImageCache::ID* SkScaledImageCache::findAndLockMip(const SkBitmap& orig,
409 SkScaledImageCache::ID* SkScaledImageCache::addAndLock(SkScaledImageCache::Rec* rec) {
432 SkScaledImageCache::ID* SkScaledImageCache::addAndLock(uint32_t genID,
441 SkScaledImageCache::ID* SkScaledImageCache::addAndLock(const SkBitmap& orig,
458 SkScaledImageCache::ID* SkScaledImageCache::addAndLockMip(const SkBitmap& orig,
469 void SkScaledImageCache::unlock(SkScaledImageCache::ID* id) {
497 void SkScaledImageCache::purgeAsNeeded() {
539 size_t SkScaledImageCache::setTotalByteLimit(size_t newLimit) {
550 void SkScaledImageCache::detach(Rec* rec) {
570 void SkScaledImageCache::moveToHead(Rec* rec) {
589 void SkScaledImageCache::addToHead(Rec* rec) {
610 void SkScaledImageCache::validate() const {
654 void SkScaledImageCache::dump() const {
664 SkDebugf("SkScaledImageCache: count=%d bytes=%d locked=%d %s\n",
669 size_t SkScaledImageCache::setSingleAllocationByteLimit(size_t newLimit) {
675 size_t SkScaledImageCache::getSingleAllocationByteLimit() const {
684 static SkScaledImageCache* gScaledImageCache = NULL;
696 static SkScaledImageCache* get_cache() {
701 gScaledImageCache = SkNEW_ARGS(SkScaledImageCache, (SkDiscardableMemory::Create));
703 gScaledImageCache = SkNEW_ARGS(SkScaledImageCache, (SK_DEFAULT_IMAGE_CACHE_LIMIT));
711 SkScaledImageCache::ID* SkScaledImageCache::FindAndLock(
720 SkScaledImageCache::ID* SkScaledImageCache::AddAndLock(
730 SkScaledImageCache::ID* SkScaledImageCache::FindAndLock(const SkBitmap& orig,
738 SkScaledImageCache::ID* SkScaledImageCache::FindAndLockMip(const SkBitmap& orig,
744 SkScaledImageCache::ID* SkScaledImageCache::AddAndLock(const SkBitmap& orig,
752 SkScaledImageCache::ID* SkScaledImageCache::AddAndLockMip(const SkBitmap& orig,
758 void SkScaledImageCache::Unlock(SkScaledImageCache::ID* id) {
765 size_t SkScaledImageCache::GetTotalBytesUsed() {
770 size_t SkScaledImageCache::GetTotalByteLimit() {
775 size_t SkScaledImageCache::SetTotalByteLimit(size_t newLimit) {
780 SkBitmap::Allocator* SkScaledImageCache::GetAllocator() {
785 void SkScaledImageCache::Dump() {
790 size_t SkScaledImageCache::SetSingleAllocationByteLimit(size_t size) {
795 size_t SkScaledImageCache::GetSingleAllocationByteLimit() {
805 return SkScaledImageCache::GetTotalBytesUsed();
809 return SkScaledImageCache::GetTotalByteLimit();
813 return SkScaledImageCache::SetTotalByteLimit(newLimit);
817 return SkScaledImageCache::GetSingleAllocationByteLimit();
821 return SkScaledImageCache::SetSingleAllocationByteLimit(newLimit);