WebKit Bugzilla
Attachment 340436 Details for
Bug 185627
: Pause display links when window is not visible.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185627-20180515152418.patch (text/plain), 3.40 KB, created by
Per Arne Vollan
on 2018-05-15 15:24:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-05-15 15:24:19 PDT
Size:
3.40 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 231814) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2018-05-15 Per Arne Vollan <pvollan@apple.com> >+ >+ Pause display links when window is not visible. >+ https://bugs.webkit.org/show_bug.cgi?id=185627 >+ <rdar://problem/39401106> >+ >+ Reviewed by Simon Fraser. >+ >+ Pause/resume display links created in the UI process when the window is hidden/shown. >+ >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::dispatchActivityStateChange): >+ * UIProcess/mac/DisplayLink.cpp: >+ (WebKit::DisplayLink::pause): >+ (WebKit::DisplayLink::resume): >+ * UIProcess/mac/DisplayLink.h: >+ > 2018-05-15 Dean Jackson <dino@apple.com> > > Provide UIView and UIImage for zoom transition >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 231814) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -1586,8 +1586,13 @@ void WebPageProxy::dispatchActivityState > #endif > > if (changed & ActivityState::IsVisible) { >- if (isViewVisible()) >+ if (isViewVisible()) { > m_visiblePageToken = m_process->visiblePageToken(); >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+ if (m_displayLink) >+ m_displayLink->resume(); >+#endif >+ } > else { > m_visiblePageToken = nullptr; > >@@ -1595,6 +1600,10 @@ void WebPageProxy::dispatchActivityState > // state, it might not send back a reply (since it won't paint anything if the web page is hidden) so we > // stop the unresponsiveness timer here. > m_process->responsivenessTimer().stop(); >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+ if (m_displayLink) >+ m_displayLink->pause(); >+#endif > } > } > >Index: Source/WebKit/UIProcess/mac/DisplayLink.cpp >=================================================================== >--- Source/WebKit/UIProcess/mac/DisplayLink.cpp (revision 231814) >+++ Source/WebKit/UIProcess/mac/DisplayLink.cpp (working copy) >@@ -81,6 +81,20 @@ bool DisplayLink::hasObservers() const > return !m_observers.isEmpty(); > } > >+void DisplayLink::pause() >+{ >+ if (!CVDisplayLinkIsRunning(m_displayLink)) >+ return; >+ CVDisplayLinkStop(m_displayLink); >+} >+ >+void DisplayLink::resume() >+{ >+ if (CVDisplayLinkIsRunning(m_displayLink)) >+ return; >+ CVDisplayLinkStart(m_displayLink); >+} >+ > CVReturn DisplayLink::displayLinkCallback(CVDisplayLinkRef displayLinkRef, const CVTimeStamp*, const CVTimeStamp*, CVOptionFlags, CVOptionFlags*, void* data) > { > WebPageProxy* webPageProxy = reinterpret_cast<WebPageProxy*>(data); >Index: Source/WebKit/UIProcess/mac/DisplayLink.h >=================================================================== >--- Source/WebKit/UIProcess/mac/DisplayLink.h (revision 231814) >+++ Source/WebKit/UIProcess/mac/DisplayLink.h (working copy) >@@ -45,6 +45,9 @@ public: > void removeObserver(unsigned observerID); > bool hasObservers() const; > >+ void pause(); >+ void resume(); >+ > private: > static CVReturn displayLinkCallback(CVDisplayLinkRef, const CVTimeStamp*, const CVTimeStamp*, CVOptionFlags, CVOptionFlags*, void* data); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185627
:
340361
| 340436 |
340449