#include "src/core/SkBitmapCache.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPixelRef.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkMutex.h"
#include "include/private/chromium/SkDiscardableMemory.h"
#include "src/core/SkMipmap.h"
#include "src/core/SkNextID.h"
#include "src/core/SkResourceCache.h"
#include "src/image/SkImage_Base.h"
#include <cstddef>
#include <utility>
uint64_t SkMakeResourceCacheSharedIDForBitmap(uint32_t bitmapGenID) { … }
void SkNotifyBitmapGenIDIsStale(uint32_t bitmapGenID) { … }
SkBitmapCacheDesc SkBitmapCacheDesc::Make(uint32_t imageID, const SkIRect& subset) { … }
SkBitmapCacheDesc SkBitmapCacheDesc::Make(const SkImage* image) { … }
namespace {
static unsigned gBitmapKeyNamespaceLabel;
struct BitmapKey : public SkResourceCache::Key { … };
}
void SkBitmapCache_setImmutableWithID(SkPixelRef* pr, uint32_t id) { … }
class SkBitmapCache::Rec : public SkResourceCache::Rec { … };
void SkBitmapCache::PrivateDeleteRec(Rec* rec) { … }
SkBitmapCache::RecPtr SkBitmapCache::Alloc(const SkBitmapCacheDesc& desc, const SkImageInfo& info,
SkPixmap* pmap) { … }
void SkBitmapCache::Add(RecPtr rec, SkBitmap* bitmap) { … }
bool SkBitmapCache::Find(const SkBitmapCacheDesc& desc, SkBitmap* result) { … }
#define CHECK_LOCAL(localCache, localName, globalName, ...) …
namespace {
static unsigned gMipMapKeyNamespaceLabel;
struct MipMapKey : public SkResourceCache::Key { … };
struct MipMapRec : public SkResourceCache::Rec { … };
}
const SkMipmap* SkMipmapCache::FindAndRef(const SkBitmapCacheDesc& desc,
SkResourceCache* localCache) { … }
static SkResourceCache::DiscardableFactory get_fact(SkResourceCache* localCache) { … }
const SkMipmap* SkMipmapCache::AddAndRef(const SkImage_Base* image, SkResourceCache* localCache) { … }