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

Commit aa0c8ab0 authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Fix hang in native bitmap recycling due to nested mutex locks"

parents 42e514b0 5cafc52f
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);