зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1389479
- Part 3. AnimationSurfaceProvider no longer needs to always dispatch to free its RasterImage. r=tnikkel
This commit is contained in:
Родитель
5360de90d7
Коммит
2aac283f14
|
@ -43,14 +43,9 @@ AnimationSurfaceProvider::DropImageReference()
|
||||||
return; // Nothing to do.
|
return; // Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
// RasterImage objects need to be destroyed on the main thread. We also need
|
// RasterImage objects need to be destroyed on the main thread.
|
||||||
// to destroy them asynchronously, because if our surface cache entry is
|
NS_ReleaseOnMainThreadSystemGroup("AnimationSurfaceProvider::mImage",
|
||||||
// destroyed and we were the only thing keeping |mImage| alive, RasterImage's
|
mImage.forget());
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawableFrameRef
|
DrawableFrameRef
|
||||||
|
|
Загрузка…
Ссылка в новой задаче