Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move lazy DisplayLink tear down logic from the WebProcess to the UIPr…
…ocess https://bugs.webkit.org/show_bug.cgi?id=216195 Reviewed by Simon Fraser. Move lazy DisplayLink tear down logic from the WebProcess to the UIProcess, now that the DisplayLink has been moved to the UIProcess due to sandboxing. After a DisplayLink no longer has any clients, we keep it firing up to 20 times without any clients in case a new client gets added shortly after. The idea was to avoid killing and respawning too many threads when adding and removing clients in quick succession. However, now that the DisplayLink lives in the UIProcess side and sends IPC to the WebProcesses every time it fires, it makes a lot more sense to implement this logic in the UIProcess side, to avoid sending unnecessary IPC to processes that do not care about it. Source/WebCore: * platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::displayDidRefresh): * platform/graphics/DisplayRefreshMonitor.h: (WebCore::DisplayRefreshMonitor::shouldBeTerminated const): Source/WebKit: * UIProcess/mac/DisplayLink.cpp: (WebKit::DisplayLink::addObserver): (WebKit::DisplayLink::removeObserver): (WebKit::DisplayLink::removeObservers): (WebKit::DisplayLink::displayLinkCallback): (WebKit::DisplayLink::hasObservers const): Deleted. * UIProcess/mac/DisplayLink.h: Canonical link: https://commits.webkit.org/229014@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing with 85 additions and 46 deletions.