WebKit Bugzilla
Attachment 342265 Details for
Bug 186429
: Send display link IPC message from display link thread.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch186429.txt (text/plain), 7.44 KB, created by
Per Arne Vollan
on 2018-06-08 08:20:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-06-08 08:20:23 PDT
Size:
7.44 KB
patch
obsolete
>Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 232619) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -1598,7 +1598,7 @@ > if (changed & ActivityState::IsVisible) { > if (isViewVisible()) { > m_visiblePageToken = m_process->visiblePageToken(); >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > if (m_displayLink) > m_displayLink->resume(); > #endif >@@ -1610,7 +1610,7 @@ > // 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 PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > if (m_displayLink) > m_displayLink->pause(); > #endif >Index: Source/WebKit/UIProcess/WebPageProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.h (revision 232619) >+++ Source/WebKit/UIProcess/WebPageProxy.h (working copy) >@@ -122,7 +122,7 @@ > #include <WebCore/WebMediaSessionManagerClient.h> > #endif > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > #include "DisplayLink.h" > #endif > >@@ -1765,7 +1765,7 @@ > void didRemoveAttachment(const String& identifier); > #endif > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > void startDisplayLink(unsigned observerID); > void stopDisplayLink(unsigned observerID); > #endif >@@ -2163,7 +2163,7 @@ > HashMap<String, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByScheme; > HashMap<uint64_t, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByIdentifier; > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > std::unique_ptr<DisplayLink> m_displayLink; > #endif > >Index: Source/WebKit/UIProcess/WebPageProxy.messages.in >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.messages.in (revision 232619) >+++ Source/WebKit/UIProcess/WebPageProxy.messages.in (working copy) >@@ -524,7 +524,7 @@ > DidRemoveAttachment(String identifier) > #endif > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > StartDisplayLink(unsigned observerID) > StopDisplayLink(unsigned observerID) > #endif >Index: Source/WebKit/UIProcess/mac/DisplayLink.cpp >=================================================================== >--- Source/WebKit/UIProcess/mac/DisplayLink.cpp (revision 232619) >+++ Source/WebKit/UIProcess/mac/DisplayLink.cpp (working copy) >@@ -26,7 +26,7 @@ > #include "config.h" > #include "DisplayLink.h" > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > > #include "DrawingAreaMessages.h" > #include "WebPageProxy.h" >@@ -34,8 +34,10 @@ > #include <wtf/ProcessPrivilege.h> > > namespace WebKit { >- >+ > DisplayLink::DisplayLink(WebCore::PlatformDisplayID displayID, WebPageProxy& webPageProxy) >+ : m_connection(webPageProxy.process().connection()) >+ , m_pageID(webPageProxy.pageID()) > { > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); > CVReturn error = CVDisplayLinkCreateWithCGDisplay(displayID, &m_displayLink); >@@ -44,7 +46,7 @@ > return; > } > >- error = CVDisplayLinkSetOutputCallback(m_displayLink, displayLinkCallback, &webPageProxy); >+ error = CVDisplayLinkSetOutputCallback(m_displayLink, displayLinkCallback, this); > if (error) { > WTFLogAlways("Could not set the display link output callback: %d", error); > return; >@@ -97,11 +99,8 @@ > > CVReturn DisplayLink::displayLinkCallback(CVDisplayLinkRef displayLinkRef, const CVTimeStamp*, const CVTimeStamp*, CVOptionFlags, CVOptionFlags*, void* data) > { >- WebPageProxy* webPageProxy = reinterpret_cast<WebPageProxy*>(data); >- RunLoop::main().dispatch([weakPtr = makeWeakPtr(*webPageProxy)] { >- if (auto* proxy = weakPtr.get()) >- proxy->process().send(Messages::DrawingArea::DisplayWasRefreshed(), proxy->pageID()); >- }); >+ DisplayLink* displayLink = reinterpret_cast<DisplayLink*>(data); >+ displayLink->m_connection->send(Messages::DrawingArea::DisplayWasRefreshed(), displayLink->m_pageID); > return kCVReturnSuccess; > } > >Index: Source/WebKit/UIProcess/mac/DisplayLink.h >=================================================================== >--- Source/WebKit/UIProcess/mac/DisplayLink.h (revision 232619) >+++ Source/WebKit/UIProcess/mac/DisplayLink.h (working copy) >@@ -25,7 +25,7 @@ > > #pragma once > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > > #include <CoreVideo/CVDisplayLink.h> > >@@ -32,6 +32,10 @@ > #include <WebCore/PlatformScreen.h> > #include <wtf/HashSet.h> > >+namespace IPC { >+ class Connection; >+} >+ > namespace WebKit { > > class WebPageProxy; >@@ -53,6 +57,8 @@ > > CVDisplayLinkRef m_displayLink { nullptr }; > HashSet<unsigned> m_observers; >+ RefPtr<IPC::Connection> m_connection; >+ uint64_t m_pageID { 0 }; > }; > > } >Index: Source/WebKit/UIProcess/mac/WebPageProxyMac.mm >=================================================================== >--- Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (revision 232619) >+++ Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (working copy) >@@ -681,7 +681,7 @@ > } > #endif > >-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > void WebPageProxy::startDisplayLink(unsigned observerID) > { > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); >Index: Source/WebKit/WebProcess/WebPage/DrawingArea.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/DrawingArea.cpp (revision 232619) >+++ Source/WebKit/WebProcess/WebPage/DrawingArea.cpp (working copy) >@@ -88,7 +88,7 @@ > function(); > } > >-#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) >+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) > RefPtr<WebCore::DisplayRefreshMonitor> DrawingArea::createDisplayRefreshMonitor(PlatformDisplayID) > { > return nullptr; >Index: Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp (revision 232619) >+++ Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp (working copy) >@@ -38,7 +38,7 @@ > > namespace WebKit { > >-#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > > class DisplayRefreshMonitorMac : public DisplayRefreshMonitor { > public: >@@ -51,7 +51,7 @@ > > void displayLinkFired() override; > bool requestRefreshCallback() override; >- >+ > private: > explicit DisplayRefreshMonitorMac(PlatformDisplayID, WebPage&); >
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186429
:
342258
|
342265
|
342274
|
342280
|
342284