summaryrefslogtreecommitdiff
path: root/libs/hwui/ResourceCache.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2015-05-04 14:34:41 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-05-04 14:34:52 +0000
commit05dc201ff64f6324c2726a8841af7021e7071b97 (patch)
treee3d4dcbeb60a01cf2f4cf7f255ef4fa3ad11c05a /libs/hwui/ResourceCache.cpp
parent1641c0cb0b6baf313c82846fe4f64007078c604f (diff)
parent7c103a36f60b690e3fe83c40210e1cb0c76bba43 (diff)
Merge "Remove Bitmap#getSkBitmap" into mnc-dev
Diffstat (limited to 'libs/hwui/ResourceCache.cpp')
-rw-r--r--libs/hwui/ResourceCache.cpp6
1 files changed, 3 insertions, 3 deletions
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,