Index: src/core/SkResourceCache.cpp |
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp |
index 6c76d350c39bda864dae139838924d2f1d92fe16..f0fe72113ed42dad67c509b71802b1d864215175 100644 |
--- a/src/core/SkResourceCache.cpp |
+++ b/src/core/SkResourceCache.cpp |
@@ -8,7 +8,6 @@ |
#include "SkChecksum.h" |
#include "SkMessageBus.h" |
#include "SkMipMap.h" |
-#include "SkMutex.h" |
#include "SkPixelRef.h" |
#include "SkResourceCache.h" |
@@ -75,7 +74,7 @@ |
class SkOneShotDiscardablePixelRef : public SkPixelRef { |
public: |
- |
+ |
// Ownership of the discardablememory is transfered to the pixelref |
SkOneShotDiscardablePixelRef(const SkImageInfo&, SkDiscardableMemory*, size_t rowBytes); |
~SkOneShotDiscardablePixelRef(); |
@@ -237,7 +236,7 @@ |
void SkResourceCache::add(Rec* rec) { |
this->checkMessages(); |
- |
+ |
SkASSERT(rec); |
// See if we already have this key (racy inserts, etc.) |
Rec* existing = fHash->find(rec->getKey()); |
@@ -245,7 +244,7 @@ |
SkDELETE(rec); |
return; |
} |
- |
+ |
this->addToHead(rec); |
fHash->add(rec); |
@@ -358,7 +357,7 @@ |
SkCachedData* SkResourceCache::newCachedData(size_t bytes) { |
this->checkMessages(); |
- |
+ |
if (fDiscardableFactory) { |
SkDiscardableMemory* dm = fDiscardableFactory(bytes); |
return dm ? SkNEW_ARGS(SkCachedData, (bytes, dm)) : NULL; |
@@ -515,6 +514,8 @@ |
} |
/////////////////////////////////////////////////////////////////////////////// |
+ |
+#include "SkThread.h" |
SK_DECLARE_STATIC_MUTEX(gMutex); |
static SkResourceCache* gResourceCache = NULL; |