Issue #2073 - m-c 1651587: Make image::Image release efficient on main thread

This commit is contained in:
Martok 2023-01-03 23:30:46 +01:00 committed by roytam1
commit 9a39001cc3
6 changed files with 75 additions and 13 deletions

View file

@ -49,7 +49,8 @@ DecodedSurfaceProvider::DropImageReference()
// get evicted is holding the surface cache lock, causing deadlock.
RefPtr<RasterImage> image = mImage;
mImage = nullptr;
NS_ReleaseOnMainThread(image.forget(), /* aAlwaysProxy = */ true);
SurfaceCache::ReleaseImageOnMainThread(image.forget(),
/* aAlwaysProxy = */ true);
}
DrawableFrameRef