NEW185627
Pause display links when window is not visible.
https://bugs.webkit.org/show_bug.cgi?id=185627
Summary Pause display links when window is not visible.
Per Arne Vollan
Reported 2018-05-14 14:31:18 PDT
Display links running in the UI process will currently fire when the window is hidden.
Attachments
Patch (3.52 KB, patch)
2018-05-14 14:37 PDT, Per Arne Vollan
simon.fraser: review+
simon.fraser: commit-queue-
Patch (3.40 KB, patch)
2018-05-15 15:24 PDT, Per Arne Vollan
ews-watchlist: commit-queue-
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.19 MB, application/zip)
2018-05-15 17:06 PDT, EWS Watchlist
no flags
Per Arne Vollan
Comment 1 2018-05-14 14:37:04 PDT
Per Arne Vollan
Comment 2 2018-05-14 14:40:21 PDT
Simon Fraser (smfr)
Comment 3 2018-05-15 14:59:13 PDT
Comment on attachment 340361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=340361&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:1602 > +#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 > + if (m_displayLink) > + m_displayLink->pause(); > +#endif Should we use this display list machinery on all OSes, not just new ones? > Source/WebKit/UIProcess/mac/DisplayLink.cpp:96 > +bool DisplayLink::pause() > +{ > + if (!CVDisplayLinkIsRunning(m_displayLink)) > + return true; > + return CVDisplayLinkStop(m_displayLink) == kCVReturnSuccess; > +} > + > +bool DisplayLink::resume() > +{ > + if (CVDisplayLinkIsRunning(m_displayLink)) > + return true; > + return CVDisplayLinkStart(m_displayLink) == kCVReturnSuccess; > +} I don't think there's any point returning bools here. Your call sites ignore them; what is the caller supposed to do? Maybe just add an assertion to catch programmer mistakes.
Per Arne Vollan
Comment 4 2018-05-15 15:24:19 PDT
Per Arne Vollan
Comment 5 2018-05-15 15:26:54 PDT
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 340361 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=340361&action=review > > > Source/WebKit/UIProcess/WebPageProxy.cpp:1602 > > +#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 > > + if (m_displayLink) > > + m_displayLink->pause(); > > +#endif > > Should we use this display list machinery on all OSes, not just new ones? I was planning to replace __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 with ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) in a coming patch. Would that be ok? > > > Source/WebKit/UIProcess/mac/DisplayLink.cpp:96 > > +bool DisplayLink::pause() > > +{ > > + if (!CVDisplayLinkIsRunning(m_displayLink)) > > + return true; > > + return CVDisplayLinkStop(m_displayLink) == kCVReturnSuccess; > > +} > > + > > +bool DisplayLink::resume() > > +{ > > + if (CVDisplayLinkIsRunning(m_displayLink)) > > + return true; > > + return CVDisplayLinkStart(m_displayLink) == kCVReturnSuccess; > > +} > > I don't think there's any point returning bools here. Your call sites ignore > them; what is the caller supposed to do? Maybe just add an assertion to > catch programmer mistakes. I removed the bool return type. Thanks for reviewing, Simon!
WebKit Commit Bot
Comment 6 2018-05-15 16:06:35 PDT
Comment on attachment 340436 [details] Patch Clearing flags on attachment: 340436 Committed r231818: <https://trac.webkit.org/changeset/231818>
EWS Watchlist
Comment 7 2018-05-15 17:06:35 PDT
Comment on attachment 340436 [details] Patch Attachment 340436 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/7692614 New failing tests: transitions/interrupted-transition-hardware.html
EWS Watchlist
Comment 8 2018-05-15 17:06:36 PDT
Created attachment 340449 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
Note You need to log in before you can comment on or make changes to this bug.