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

Unified Diff: src/core/SkResourceCache.h

Issue 511283002: rename ScaledImageCache to ResourceCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 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/SkBitmapProcState.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/SkScaledImageCache.h b/src/core/SkResourceCache.h
similarity index 95%
rename from src/core/SkScaledImageCache.h
rename to src/core/SkResourceCache.h
index c31f8ffed938843361304224999ffe9d4e3ffd50..0873bd4c2efa099cd68ca53c18e9259d40d7b46e 100644
--- a/src/core/SkScaledImageCache.h
+++ b/src/core/SkResourceCache.h
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#ifndef SkScaledImageCache_DEFINED
-#define SkScaledImageCache_DEFINED
+#ifndef SkResourceCache_DEFINED
+#define SkResourceCache_DEFINED
#include "SkBitmap.h"
@@ -23,7 +23,7 @@ class SkMipMap;
* As a convenience, a global instance is also defined, which can be safely
* access across threads via the static methods (e.g. FindAndLock, etc.).
*/
-class SkScaledImageCache {
+class SkResourceCache {
public:
struct Key {
// Call this to access your private contents. Must not use the address after calling init()
@@ -58,7 +58,7 @@ public:
};
struct Rec {
- typedef SkScaledImageCache::Key Key;
+ typedef SkResourceCache::Key Key;
Rec() : fLockCount(1) {}
virtual ~Rec() {}
@@ -78,7 +78,7 @@ public:
int32_t fLockCount;
int32_t fPad;
- friend class SkScaledImageCache;
+ friend class SkResourceCache;
};
typedef const Rec* ID;
@@ -122,7 +122,7 @@ public:
* and getTotalByteLimit() will return 0, and setTotalByteLimit
* will ignore its argument and return 0.
*/
- SkScaledImageCache(DiscardableFactory);
+ SkResourceCache(DiscardableFactory);
/**
* Construct the cache, allocating memory with malloc, and respect the
@@ -130,8 +130,8 @@ public:
* that pushes the total bytesUsed over the limit. Note: The limit can be
* changed at runtime with setTotalByteLimit.
*/
- explicit SkScaledImageCache(size_t byteLimit);
- ~SkScaledImageCache();
+ explicit SkResourceCache(size_t byteLimit);
+ ~SkResourceCache();
const Rec* findAndLock(const Key& key);
const Rec* addAndLock(Rec*);
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698