/* static */ LayersBackend Compositor::GetBackend() { if (sBackend != LayersBackend::LAYERS_NONE) { AssertOnCompositorThread(); } return sBackend; }
void CompositorVsyncDispatcher::SetCompositorVsyncObserver(VsyncObserver* aVsyncObserver) { AssertOnCompositorThread(); { // scope lock MutexAutoLock lock(mCompositorObserverLock); mCompositorVsyncObserver = aVsyncObserver; } bool observeVsync = aVsyncObserver != nullptr; nsCOMPtr<nsIRunnable> vsyncControl = NS_NewRunnableMethodWithArg<bool>(this, &CompositorVsyncDispatcher::ObserveVsync, observeVsync); NS_DispatchToMainThread(vsyncControl); }
/* static */ LayersBackend Compositor::GetBackend() { AssertOnCompositorThread(); return sBackend; }