mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 14:46:02 +00:00
Bug 1389479 - Part 3. AnimationSurfaceProvider no longer needs to always dispatch to free its RasterImage. r=tnikkel
This commit is contained in:
parent
5360de90d7
commit
2aac283f14
@ -43,14 +43,9 @@ AnimationSurfaceProvider::DropImageReference()
|
||||
return; // Nothing to do.
|
||||
}
|
||||
|
||||
// RasterImage objects need to be destroyed on the main thread. We also need
|
||||
// to destroy them asynchronously, because if our surface cache entry is
|
||||
// destroyed and we were the only thing keeping |mImage| alive, RasterImage's
|
||||
// destructor may call into the surface cache while whatever code caused us to
|
||||
// get evicted is holding the surface cache lock, causing deadlock.
|
||||
RefPtr<RasterImage> image = mImage;
|
||||
mImage = nullptr;
|
||||
NS_ReleaseOnMainThreadSystemGroup(image.forget(), /* aAlwaysProxy = */ true);
|
||||
// RasterImage objects need to be destroyed on the main thread.
|
||||
NS_ReleaseOnMainThreadSystemGroup("AnimationSurfaceProvider::mImage",
|
||||
mImage.forget());
|
||||
}
|
||||
|
||||
DrawableFrameRef
|
||||
|
Loading…
x
Reference in New Issue
Block a user