Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cafc52f authored by Chet Haase's avatar Chet Haase
Browse files

Fix hang in native bitmap recycling due to nested mutex locks

Change-Id: Ic37d5408ddb3f68aba6520fb0c78ffde91dfbe62
parent b43d7589
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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);