зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1820204 - Simplify some wayland vsync code. r=rmader
That code only runs in the parent process by design. And we use infallible new so there's no need to release-assert that allocation succeeded. Differential Revision: https://phabricator.services.mozilla.com/D171579
This commit is contained in:
Родитель
ec84fd2378
Коммит
f66702754b
|
@ -3718,18 +3718,15 @@ void nsWindow::CreateCompositorVsyncDispatcher() {
|
|||
nsBaseWidget::CreateCompositorVsyncDispatcher();
|
||||
return;
|
||||
}
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
if (!mCompositorVsyncDispatcherLock) {
|
||||
mCompositorVsyncDispatcherLock =
|
||||
MakeUnique<Mutex>("mCompositorVsyncDispatcherLock");
|
||||
}
|
||||
MutexAutoLock lock(*mCompositorVsyncDispatcherLock);
|
||||
if (!mCompositorVsyncDispatcher) {
|
||||
LOG_VSYNC(" create CompositorVsyncDispatcher()");
|
||||
mCompositorVsyncDispatcher =
|
||||
new CompositorVsyncDispatcher(mWaylandVsyncDispatcher);
|
||||
}
|
||||
if (!mCompositorVsyncDispatcherLock) {
|
||||
mCompositorVsyncDispatcherLock =
|
||||
MakeUnique<Mutex>("mCompositorVsyncDispatcherLock");
|
||||
}
|
||||
MutexAutoLock lock(*mCompositorVsyncDispatcherLock);
|
||||
if (!mCompositorVsyncDispatcher) {
|
||||
LOG_VSYNC(" create CompositorVsyncDispatcher()");
|
||||
mCompositorVsyncDispatcher =
|
||||
new CompositorVsyncDispatcher(mWaylandVsyncDispatcher);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -6289,8 +6286,7 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
mWindowType == WindowType::TopLevel) {
|
||||
mWaylandVsyncSource = new WaylandVsyncSource(this);
|
||||
mWaylandVsyncDispatcher = new VsyncDispatcher(mWaylandVsyncSource);
|
||||
LOG_VSYNC(" created WaylandVsyncSource)");
|
||||
MOZ_RELEASE_ASSERT(mWaylandVsyncSource);
|
||||
LOG_VSYNC(" created WaylandVsyncSource");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче