We currently process timers for 50ms in a loop. We should break out immediately when there is a display refresh to allow rendering update.
Created attachment 392711 [details] wip
Comment on attachment 392711 [details] wip View in context: https://bugs.webkit.org/attachment.cgi?id=392711&action=review > Source/WebCore/platform/ThreadTimers.cpp:129 > + if (DisplayRefreshMonitorManager::sharedManager().hasPendingRefresh() && !m_didBreakForPendingDisplayRefreshWithoutFiringTimers) { It's a bit gross for timers to know about DisplayRefreshMonitorManager, and we need something that works on iOS too. > Source/WebCore/platform/graphics/DisplayRefreshMonitor.h:86 > + WEBCORE_EXPORT void setIsPreviousFrameDone(bool); I presume this is WEBCORE_EXPORT just to satisfy the linker, not because anyone else calls it (because it doesn't lock). > Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp:250 > + DisplayRefreshMonitorManager::sharedManager().displayWasUpdated(displayID); Which thread are we on here? DisplayRefreshMonitorManager::displayWasUpdated() doesn't look thread safe.