Run display links in the UI process when ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING...
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2018 18:45:52 +0000 (18:45 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2018 18:45:52 +0000 (18:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186379

Reviewed by Brent Fulgham.

Replace __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 with ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchActivityStateChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/DisplayLink.cpp:
* UIProcess/mac/DisplayLink.h:
* UIProcess/mac/WebPageProxyMac.mm:
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/mac/DrawingAreaMac.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/mac/DisplayLink.cpp
Source/WebKit/UIProcess/mac/DisplayLink.h
Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp

index 61c1ddc..ae186cc 100644 (file)
@@ -1,5 +1,24 @@
 2018-06-08  Per Arne Vollan  <pvollan@apple.com>
 
+        Run display links in the UI process when ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) is true.
+        https://bugs.webkit.org/show_bug.cgi?id=186379
+
+        Reviewed by Brent Fulgham.
+
+        Replace __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 with ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING).
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::dispatchActivityStateChange):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/mac/DisplayLink.cpp:
+        * UIProcess/mac/DisplayLink.h:
+        * UIProcess/mac/WebPageProxyMac.mm:
+        * WebProcess/WebPage/DrawingArea.cpp:
+        * WebProcess/WebPage/mac/DrawingAreaMac.cpp:
+
+2018-06-08  Per Arne Vollan  <pvollan@apple.com>
+
         Send display link IPC message from display link thread.
         https://bugs.webkit.org/show_bug.cgi?id=186429
 
index d2b9952..4dd0aec 100644 (file)
@@ -1598,7 +1598,7 @@ void WebPageProxy::dispatchActivityStateChange()
     if (changed & ActivityState::IsVisible) {
         if (isViewVisible()) {
             m_visiblePageToken = m_process->visiblePageToken();
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
             if (m_displayLink)
                 m_displayLink->resume();
 #endif
@@ -1610,7 +1610,7 @@ void WebPageProxy::dispatchActivityStateChange()
             // 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) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
             if (m_displayLink)
                 m_displayLink->pause();
 #endif
index a4d8d4c..2b62a38 100644 (file)
@@ -122,7 +122,7 @@ OBJC_CLASS _WKRemoteObjectRegistry;
 #include <WebCore/WebMediaSessionManagerClient.h>
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 #include "DisplayLink.h"
 #endif
 
@@ -1765,7 +1765,7 @@ private:
     void didRemoveAttachment(const String& identifier);
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     void startDisplayLink(unsigned observerID);
     void stopDisplayLink(unsigned observerID);
 #endif
@@ -2163,7 +2163,7 @@ private:
     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) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     std::unique_ptr<DisplayLink> m_displayLink;
 #endif
 
index 105f4cf..10500ee 100644 (file)
@@ -524,7 +524,7 @@ messages -> WebPageProxy {
     DidRemoveAttachment(String identifier)
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     StartDisplayLink(unsigned observerID)
     StopDisplayLink(unsigned observerID)
 #endif
index 04e393e..d759b97 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "DisplayLink.h"
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 
 #include "DrawingAreaMessages.h"
 #include "WebPageProxy.h"
index 71bc86b..6cb732c 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 
 #include <CoreVideo/CVDisplayLink.h>
 
index 37af08c..ac5025f 100644 (file)
@@ -681,7 +681,7 @@ _WKRemoteObjectRegistry *WebPageProxy::remoteObjectRegistry()
 }
 #endif
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 void WebPageProxy::startDisplayLink(unsigned observerID)
 {
     ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
index 3c0f971..3711c91 100644 (file)
@@ -88,7 +88,7 @@ void DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition(WTF::Function<void
     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) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING))
 RefPtr<WebCore::DisplayRefreshMonitor> DrawingArea::createDisplayRefreshMonitor(PlatformDisplayID)
 {
     return nullptr;
index 0b5668e..dc4f87b 100644 (file)
@@ -38,7 +38,7 @@ using namespace WebCore;
 
 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) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 
 class DisplayRefreshMonitorMac : public DisplayRefreshMonitor {
 public: