Title: [286741] branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess
- Revision
- 286741
- Author
- alanc...@apple.com
- Date
- 2021-12-08 14:10:34 -0800 (Wed, 08 Dec 2021)
Log Message
Apply patch. rdar://problem/85928816
Modified Paths
Diff
Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (286740 => 286741)
--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-12-08 22:08:04 UTC (rev 286740)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-12-08 22:10:34 UTC (rev 286741)
@@ -2899,13 +2899,21 @@
}
#if HAVE(CVDISPLAYLINK)
-void WebPageProxy::wheelEventHysteresisUpdated(PAL::HysteresisState state)
+void WebPageProxy::wheelEventHysteresisUpdated(PAL::HysteresisState)
{
+ updateDisplayLinkFrequency();
+}
+
+void WebPageProxy::updateDisplayLinkFrequency()
+{
if (!m_process->hasConnection() || !m_displayID)
return;
- bool wantsFullSpeedUpdates = state == PAL::HysteresisState::Started;
- process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, wantsFullSpeedUpdates);
+ bool wantsFullSpeedUpdates = m_wheelEventActivityHysteresis.state() == PAL::HysteresisState::Started;
+ if (wantsFullSpeedUpdates != m_registeredForFullSpeedUpdates) {
+ process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, wantsFullSpeedUpdates);
+ m_registeredForFullSpeedUpdates = wantsFullSpeedUpdates;
+ }
}
#endif
@@ -2912,13 +2920,7 @@
void WebPageProxy::updateWheelEventActivityAfterProcessSwap()
{
#if HAVE(CVDISPLAYLINK)
- if (m_wheelEventActivityHysteresis.state() == PAL::HysteresisState::Started) {
- if (!m_process->hasConnection() || !m_displayID)
- return;
-
- bool wantsFullSpeedUpdates = true;
- process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, wantsFullSpeedUpdates);
- }
+ updateDisplayLinkFrequency();
#endif
}
Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h (286740 => 286741)
--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h 2021-12-08 22:08:04 UTC (rev 286740)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h 2021-12-08 22:10:34 UTC (rev 286741)
@@ -2383,6 +2383,7 @@
#if HAVE(CVDISPLAYLINK)
void wheelEventHysteresisUpdated(PAL::HysteresisState);
+ void updateDisplayLinkFrequency();
#endif
void updateWheelEventActivityAfterProcessSwap();
@@ -2752,6 +2753,8 @@
bool m_hasUpdatedRenderingAfterDidCommitLoad { true };
+ bool m_registeredForFullSpeedUpdates { false };
+
WebCore::ResourceRequest m_decidePolicyForResponseRequest;
bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes