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

Unified Diff: src/core/SkScaledImageCache.h

Issue 54203006: Break up SkLazyPixelRef functionally into class hierarchy. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
Index: src/core/SkScaledImageCache.h
diff --git a/src/core/SkScaledImageCache.h b/src/core/SkScaledImageCache.h
index fee69d2d58598eb8fee6a7562a45bd2940912e6f..a55c9384ce185fcb9e06aa6138c5a197590adb52 100644
--- a/src/core/SkScaledImageCache.h
+++ b/src/core/SkScaledImageCache.h
@@ -31,6 +31,8 @@ public:
* instance of this cache.
*/
+ static SkScaledImageCache* Instance();
scroggo 2013/10/31 21:53:06 I think typically our functions to get the global
hal.canary 2013/11/01 03:29:24 Done.
+
static ID* FindAndLock(uint32_t pixelGenerationID,
int32_t width,
int32_t height,
@@ -59,7 +61,7 @@ public:
///////////////////////////////////////////////////////////////////////////
- SkScaledImageCache(size_t byteLimit);
+ SkScaledImageCache(size_t byteLimit, SkBaseMutex* mutex = NULL);
~SkScaledImageCache();
/**
@@ -114,8 +116,8 @@ public:
*/
void unlock(ID*);
- size_t getBytesUsed() const { return fBytesUsed; }
- size_t getByteLimit() const { return fByteLimit; }
+ size_t getBytesUsed() const;
+ size_t getByteLimit() const;
/**
* Set the maximum number of bytes available to this cache. If the current
@@ -127,6 +129,8 @@ public:
public:
struct Rec;
private:
+ SkBaseMutex* fMutex; // can be NULL
+
Rec* fHead;
Rec* fTail;
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkScaledImageCache.cpp » ('j') | src/lazy/SkCachingPixelRef.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698