Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: src/core/SkResourceCache.h

Issue 561953002: Make SkBitmapCache remove invalid bitmaps from the SkResourceCache. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cache: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapCache.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.h
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h
index f2fd8fc047443b64e0688c28cf3804ec78fbfbed..93f2ca49e686d7ab2273b54ca0a8ca352cf8ab74 100644
--- a/src/core/SkResourceCache.h
+++ b/src/core/SkResourceCache.h
@@ -76,7 +76,6 @@ public:
Rec* fNext;
Rec* fPrev;
int32_t fLockCount;
- int32_t fPad;
friend class SkResourceCache;
};
@@ -98,6 +97,7 @@ public:
static const Rec* AddAndLock(Rec*);
static void Add(Rec*);
static void Unlock(ID);
+ static void Remove(ID);
static size_t GetTotalBytesUsed();
static size_t GetTotalByteLimit();
@@ -140,6 +140,7 @@ public:
const Rec* findAndLock(const Key& key);
const Rec* addAndLock(Rec*);
void add(Rec*);
+ void remove(Rec*);
/**
* Given a non-null ID ptr returned by either findAndLock or addAndLock,
@@ -189,7 +190,6 @@ private:
size_t fSingleAllocationByteLimit;
int fCount;
- void purgeRec(Rec*);
void purgeAsNeeded();
// linklist management
« no previous file with comments | « src/core/SkBitmapCache.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698