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

@ -434,8 +434,7 @@ RasterImage::OnSurfaceDiscarded(const SurfaceKey& aSurfaceKey)
mAnimationState && aSurfaceKey.Playback() == PlaybackType::eAnimated;
RefPtr<RasterImage> image = this;
NS_DispatchToMainThread(NS_NewRunnableFunction(
[=]() -> void {
NS_DispatchToMainThread(NS_NewRunnableFunction([=]() -> void {
image->OnSurfaceDiscardedInternal(animatedFramesDiscarded);
}));
}