Bug 1585523 - Use NSAnimationContext instead of CATransaction when triggering off-main-thread composites. r=mattwoodrow

When called on a non-main thread, [NSAnimationContext beginGrouping] calls [CATransaction activateBackground:].
There's a chance that doing so might help with some of the crashes we're seeing during [CATransaction commit].

Differential Revision: https://phabricator.services.mozilla.com/D47854

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-10-03 01:14:23 +00:00
Родитель 886972eb41
Коммит 120189bb62
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2031,10 +2031,10 @@ void nsChildView::PostRender(WidgetRenderingContext* aContext) {
compositingState->mNativeLayerChangesPending = true;
} else {
// Force a CoreAnimation layer tree update from this thread.
[CATransaction begin];
[NSAnimationContext beginGrouping];
mNativeLayerRoot->ApplyChanges();
compositingState->mNativeLayerChangesPending = false;
[CATransaction commit];
[NSAnimationContext endGrouping];
}
} else {
UniquePtr<GLManager> manager(GLManager::CreateGLManager(aContext->mLayerManager));