summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-11-23 13:47:26 -0800
committerChet Haase <chet@google.com>2010-11-23 14:11:43 -0800
commit5cafc52fb10bd05c587a7dec41c953c0722f302a (patch)
treecbfdf46e03841a5462a3f8a7c9cbba24d41904a5 /libs
parentb43d7589cf6201fc05f4c9d8b4a0c44d7cdba81e (diff)
downloadframeworks_base-5cafc52fb10bd05c587a7dec41c953c0722f302a.zip
frameworks_base-5cafc52fb10bd05c587a7dec41c953c0722f302a.tar.gz
frameworks_base-5cafc52fb10bd05c587a7dec41c953c0722f302a.tar.bz2
Fix hang in native bitmap recycling due to nested mutex locks
Change-Id: Ic37d5408ddb3f68aba6520fb0c78ffde91dfbe62
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/ResourceCache.cpp5
-rw-r--r--libs/hwui/ResourceCache.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp
index 5ebd2c0..00de39b 100644
--- a/libs/hwui/ResourceCache.cpp
+++ b/libs/hwui/ResourceCache.cpp
@@ -111,11 +111,6 @@ void ResourceCache::recycle(SkBitmap* resource) {
resource->setPixels(NULL, NULL);
return;
}
- recycle((void*) resource);
-}
-
-void ResourceCache::recycle(void* resource) {
- Mutex::Autolock _l(mLock);
ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
if (ref == NULL) {
// Should not get here - shouldn't get a call to recycle if we're not yet tracking it
diff --git a/libs/hwui/ResourceCache.h b/libs/hwui/ResourceCache.h
index b0abe2c..1bb4390 100644
--- a/libs/hwui/ResourceCache.h
+++ b/libs/hwui/ResourceCache.h
@@ -61,7 +61,6 @@ public:
void decrementRefcount(SkBitmap* resource);
void decrementRefcount(SkiaShader* resource);
void decrementRefcount(SkiaColorFilter* resource);
- void recycle(void* resource);
void recycle(SkBitmap* resource);
void destructor(SkBitmap* resource);
void destructor(SkiaShader* resource);