use dynamic hash to speed up scaledimagecache
BUG=
Review URL: https://codereview.chromium.org/20344002
git-svn-id: http://skia.googlecode.com/svn/trunk@10362 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp
index 8d34dfb..e901abd 100644
--- a/src/core/SkScaledImageCache.cpp
+++ b/src/core/SkScaledImageCache.cpp
@@ -149,6 +149,7 @@
///////////////////////////////////////////////////////////////////////////////
+// experimental hash to speed things up
//#define USE_HASH
SkScaledImageCache::SkScaledImageCache(size_t byteLimit) {
@@ -298,8 +299,6 @@
SkASSERT(rec->fLockCount > 0);
rec->fLockCount -= 1;
-// SkDebugf("Unlock: [%d %d] %d\n", rec->fBitmap.width(), rec->fBitmap.height(), rec->fLockCount);
-
// we may have been over-budget, but now have released something, so check
// if we should purge.
if (0 == rec->fLockCount) {
@@ -318,7 +317,6 @@
}
Rec* prev = rec->fPrev;
if (0 == rec->fLockCount) {
-// SkDebugf("Purge: [%d %d] %d\n", rec->fBitmap.width(), rec->fBitmap.height(), fCount);
size_t used = rec->bytesUsed();
SkASSERT(used <= bytesUsed);
bytesUsed -= used;