From 4bd981ec533a65e8dee053a0a709b484770b0a76 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 15 Apr 2015 15:52:10 -0700 Subject: Remove Bitmap#getSkBitmap Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27 --- libs/hwui/ResourceCache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/hwui/ResourceCache.cpp') diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp index d3b8d706e606..454fedc2b179 100644 --- a/libs/hwui/ResourceCache.cpp +++ b/libs/hwui/ResourceCache.cpp @@ -59,13 +59,13 @@ void ResourceCache::unlock() { mLock.unlock(); } -const SkBitmap* ResourceCache::insert(const SkBitmap* bitmapResource) { +const SkBitmap* ResourceCache::insert(const SkBitmap& bitmapResource) { Mutex::Autolock _l(mLock); BitmapKey bitmapKey(bitmapResource); ssize_t index = mBitmapCache.indexOfKey(bitmapKey); if (index == NAME_NOT_FOUND) { - SkBitmap* cachedBitmap = new SkBitmap(*bitmapResource); + SkBitmap* cachedBitmap = new SkBitmap(bitmapResource); index = mBitmapCache.add(bitmapKey, cachedBitmap); return cachedBitmap; } @@ -121,7 +121,7 @@ void ResourceCache::decrementRefcountLocked(void* resource) { } void ResourceCache::decrementRefcountLocked(const SkBitmap* bitmapResource) { - BitmapKey bitmapKey(bitmapResource); + BitmapKey bitmapKey(*bitmapResource); ssize_t index = mBitmapCache.indexOfKey(bitmapKey); LOG_ALWAYS_FATAL_IF(index == NAME_NOT_FOUND, -- cgit v1.2.3-59-g8ed1b