⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286741 in webkit


Ignore:
Timestamp:
Dec 8, 2021, 2:10:34 PM (5 years ago)
Author:
Alan Coon
Message:

Apply patch. rdar://problem/85928816

Location:
branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp

    r286733 r286741  
    29002900
    29012901#if HAVE(CVDISPLAYLINK)
    2902 void WebPageProxy::wheelEventHysteresisUpdated(PAL::HysteresisState state)
     2902void WebPageProxy::wheelEventHysteresisUpdated(PAL::HysteresisState)
     2903{
     2904    updateDisplayLinkFrequency();
     2905}
     2906
     2907void WebPageProxy::updateDisplayLinkFrequency()
    29032908{
    29042909    if (!m_process->hasConnection() || !m_displayID)
    29052910        return;
    29062911
    2907     bool wantsFullSpeedUpdates = state == PAL::HysteresisState::Started;
    2908     process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, wantsFullSpeedUpdates);
     2912    bool wantsFullSpeedUpdates = m_wheelEventActivityHysteresis.state() == PAL::HysteresisState::Started;
     2913    if (wantsFullSpeedUpdates != m_registeredForFullSpeedUpdates) {
     2914        process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, wantsFullSpeedUpdates);
     2915        m_registeredForFullSpeedUpdates = wantsFullSpeedUpdates;
     2916    }
    29092917}
    29102918#endif
     
    29132921{
    29142922#if HAVE(CVDISPLAYLINK)
    2915     if (m_wheelEventActivityHysteresis.state() == PAL::HysteresisState::Started) {
    2916         if (!m_process->hasConnection() || !m_displayID)
    2917             return;
    2918 
    2919         bool wantsFullSpeedUpdates = true;
    2920         process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, wantsFullSpeedUpdates);
    2921     }
     2923    updateDisplayLinkFrequency();
    29222924#endif
    29232925}
  • branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h

    r286737 r286741  
    23842384#if HAVE(CVDISPLAYLINK)
    23852385    void wheelEventHysteresisUpdated(PAL::HysteresisState);
     2386    void updateDisplayLinkFrequency();
    23862387#endif
    23872388    void updateWheelEventActivityAfterProcessSwap();
     
    27532754    bool m_hasUpdatedRenderingAfterDidCommitLoad { true };
    27542755
     2756    bool m_registeredForFullSpeedUpdates { false };
     2757
    27552758    WebCore::ResourceRequest m_decidePolicyForResponseRequest;
    27562759    bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
Note: See TracChangeset for help on using the changeset viewer.