Title: [270175] trunk
Revision
270175
Author
[email protected]
Date
2020-11-26 18:18:30 -0800 (Thu, 26 Nov 2020)

Log Message

[WinCairo] Enable GPU process
https://bugs.webkit.org/show_bug.cgi?id=219294

Reviewed by Don Olmstead.

.:

* Source/cmake/OptionsWin.cmake: Turned ENABLE_GPU_PROCESS on for WinCairo.

Source/WebCore:

* platform/graphics/FontPlatformData.cpp:
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::familyName const): Added.

Source/WebKit:

Added stub functions to build GPU process.

Invoke the following command to enable GPU process:
> reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 1 /f

Invoke the following command to disable GPU process:
> reg delete HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /f

* GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp: Added.
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
(WebKit::RemoteMediaPlayerProxy::enterFullscreen):
(WebKit::RemoteMediaPlayerProxy::exitFullscreen):
* GPUProcess/win/GPUProcessMainWin.cpp: Added.
(WebKit::initializeAuxiliaryProcess<GPUProcess>):
(WebKit::GPUProcessMain):
* GPUProcess/win/GPUProcessWin.cpp: Added.
(WebKit::GPUProcess::initializeProcess):
(WebKit::GPUProcess::initializeProcessName):
(WebKit::GPUProcess::initializeSandbox):
* PlatformWin.cmake:
* Shared/WebPreferencesDefaultValues.h:
* Shared/curl/WebCoreArgumentCodersCurl.cpp:
(IPC::ArgumentCoder<FontAttributes>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<FontAttributes>::decodePlatformData): Deleted.
(IPC::ArgumentCoder<Ref<Font>>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData): Deleted.
* Shared/win/WebCoreArgumentCodersWin.cpp: Added.
(IPC::ArgumentCoder<FontAttributes>::encodePlatformData):
(IPC::ArgumentCoder<FontAttributes>::decodePlatformData):
(IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):
* Shared/win/WebPreferencesDefaultValuesWin.cpp: Added.
(WebKit::isFeatureFlagEnabled):
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::submitDisplayList):
(WebKit::RemoteRenderingBackendProxy::createItemBuffer):
* WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp: Added.
(WebKit::createVideoLayerRemote):

Source/WTF:

* wtf/PlatformHave.h: Turned HAVE_SYSTEM_FEATURE_FLAGS on for Windows.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (270174 => 270175)


--- trunk/ChangeLog	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/ChangeLog	2020-11-27 02:18:30 UTC (rev 270175)
@@ -1,3 +1,12 @@
+2020-11-26  Fujii Hironori  <[email protected]>
+
+        [WinCairo] Enable GPU process
+        https://bugs.webkit.org/show_bug.cgi?id=219294
+
+        Reviewed by Don Olmstead.
+
+        * Source/cmake/OptionsWin.cmake: Turned ENABLE_GPU_PROCESS on for WinCairo.
+
 2020-11-26  Yoshiaki Jitsukawa  <[email protected]>
 
         [PlayStation] Enable ResourceLoadStatistics

Modified: trunk/Source/WTF/ChangeLog (270174 => 270175)


--- trunk/Source/WTF/ChangeLog	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WTF/ChangeLog	2020-11-27 02:18:30 UTC (rev 270175)
@@ -1,3 +1,12 @@
+2020-11-26  Fujii Hironori  <[email protected]>
+
+        [WinCairo] Enable GPU process
+        https://bugs.webkit.org/show_bug.cgi?id=219294
+
+        Reviewed by Don Olmstead.
+
+        * wtf/PlatformHave.h: Turned HAVE_SYSTEM_FEATURE_FLAGS on for Windows.
+
 2020-11-26  Michael Catanzaro  <[email protected]>
 
         [WPE][GTK] Fix build with GCC 11

Modified: trunk/Source/WTF/wtf/PlatformHave.h (270174 => 270175)


--- trunk/Source/WTF/wtf/PlatformHave.h	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2020-11-27 02:18:30 UTC (rev 270175)
@@ -599,7 +599,7 @@
 #define HAVE_UICONTEXTMENU_LOCATION 1
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(WIN)
 #define HAVE_SYSTEM_FEATURE_FLAGS 1
 #endif
 

Modified: trunk/Source/WebCore/ChangeLog (270174 => 270175)


--- trunk/Source/WebCore/ChangeLog	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebCore/ChangeLog	2020-11-27 02:18:30 UTC (rev 270175)
@@ -1,3 +1,14 @@
+2020-11-26  Fujii Hironori  <[email protected]>
+
+        [WinCairo] Enable GPU process
+        https://bugs.webkit.org/show_bug.cgi?id=219294
+
+        Reviewed by Don Olmstead.
+
+        * platform/graphics/FontPlatformData.cpp:
+        * platform/graphics/win/FontPlatformDataCairoWin.cpp:
+        (WebCore::FontPlatformData::familyName const): Added.
+
 2020-11-26  Yoshiaki Jitsukawa  <[email protected]>
 
         AXObjectCache::focusedObjectForPage() is not defined when ENABLE(ACCESSIBILITY) is off

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp (270174 => 270175)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -81,7 +81,7 @@
 }
 #endif
 
-#if !USE(CORE_TEXT)
+#if !USE(CORE_TEXT) && !PLATFORM(WIN)
 
 String FontPlatformData::familyName() const
 {

Modified: trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp (270174 => 270175)


--- trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -5,6 +5,7 @@
  * Copyright (C) 2006-2008, 2016 Apple Inc.
  * Copyright (C) 2007 Alp Toker
  * Copyright (C) 2008, 2010, 2011 Brent Fulgham
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -26,6 +27,7 @@
 #include "config.h"
 #include "FontPlatformData.h"
 
+#include "HWndDC.h"
 #include "SharedBuffer.h"
 #include <wtf/HashMap.h>
 #include <wtf/RetainPtr.h>
@@ -108,4 +110,16 @@
 }
 #endif
 
+String FontPlatformData::familyName() const
+{
+    HWndDC hdc(0);
+    SaveDC(hdc);
+    cairo_win32_scaled_font_select_font(scaledFont(), hdc);
+    wchar_t faceName[LF_FACESIZE];
+    GetTextFace(hdc, LF_FACESIZE, faceName);
+    cairo_win32_scaled_font_done_font(scaledFont());
+    RestoreDC(hdc, -1);
+    return faceName;
 }
+
+}

Modified: trunk/Source/WebKit/ChangeLog (270174 => 270175)


--- trunk/Source/WebKit/ChangeLog	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebKit/ChangeLog	2020-11-27 02:18:30 UTC (rev 270175)
@@ -1,3 +1,51 @@
+2020-11-26  Fujii Hironori  <[email protected]>
+
+        [WinCairo] Enable GPU process
+        https://bugs.webkit.org/show_bug.cgi?id=219294
+
+        Reviewed by Don Olmstead.
+
+        Added stub functions to build GPU process.
+
+        Invoke the following command to enable GPU process:
+        > reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 1 /f
+
+        Invoke the following command to disable GPU process:
+        > reg delete HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /f
+
+        * GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp: Added.
+        (WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
+        (WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
+        (WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
+        (WebKit::RemoteMediaPlayerProxy::enterFullscreen):
+        (WebKit::RemoteMediaPlayerProxy::exitFullscreen):
+        * GPUProcess/win/GPUProcessMainWin.cpp: Added.
+        (WebKit::initializeAuxiliaryProcess<GPUProcess>):
+        (WebKit::GPUProcessMain):
+        * GPUProcess/win/GPUProcessWin.cpp: Added.
+        (WebKit::GPUProcess::initializeProcess):
+        (WebKit::GPUProcess::initializeProcessName):
+        (WebKit::GPUProcess::initializeSandbox):
+        * PlatformWin.cmake:
+        * Shared/WebPreferencesDefaultValues.h:
+        * Shared/curl/WebCoreArgumentCodersCurl.cpp:
+        (IPC::ArgumentCoder<FontAttributes>::encodePlatformData): Deleted.
+        (IPC::ArgumentCoder<FontAttributes>::decodePlatformData): Deleted.
+        (IPC::ArgumentCoder<Ref<Font>>::encodePlatformData): Deleted.
+        (IPC::ArgumentCoder<Ref<Font>>::decodePlatformData): Deleted.
+        * Shared/win/WebCoreArgumentCodersWin.cpp: Added.
+        (IPC::ArgumentCoder<FontAttributes>::encodePlatformData):
+        (IPC::ArgumentCoder<FontAttributes>::decodePlatformData):
+        (IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
+        (IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):
+        * Shared/win/WebPreferencesDefaultValuesWin.cpp: Added.
+        (WebKit::isFeatureFlagEnabled):
+        * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
+        (WebKit::RemoteRenderingBackendProxy::submitDisplayList):
+        (WebKit::RemoteRenderingBackendProxy::createItemBuffer):
+        * WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp: Added.
+        (WebKit::createVideoLayerRemote):
+
 2020-11-26  Youenn Fablet  <[email protected]>
 
         https://collab-project.github.io/videojs-record/demo/video-only.html is not working

Added: trunk/Source/WebKit/GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp (0 => 270175)


--- trunk/Source/WebKit/GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp	                        (rev 0)
+++ trunk/Source/WebKit/GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -0,0 +1,65 @@
+/*
+* Copyright (C) 2020 Sony Interactive Entertainment Inc.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "config.h"
+#include "RemoteMediaPlayerProxy.h"
+
+#if ENABLE(GPU_PROCESS)
+
+#include "LayerHostingContext.h"
+#include <WebCore/NotImplemented.h>
+
+namespace WebKit {
+
+void RemoteMediaPlayerProxy::prepareForPlayback(bool, WebCore::MediaPlayerEnums::Preload, bool, bool, float videoContentScale, CompletionHandler<void(Optional<LayerHostingContextID>&& inlineLayerHostingContextId)>&&)
+{
+    notImplemented();
+}
+
+void RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable()
+{
+    notImplemented();
+}
+
+void RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged()
+{
+    notImplemented();
+}
+
+#if ENABLE(VIDEO_PRESENTATION_MODE)
+void RemoteMediaPlayerProxy::enterFullscreen(CompletionHandler<void()>&& completionHandler)
+{
+    notImplemented();
+}
+
+void RemoteMediaPlayerProxy::exitFullscreen(CompletionHandler<void()>&& completionHandler)
+{
+    notImplemented();
+}
+#endif
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS)

Added: trunk/Source/WebKit/GPUProcess/win/GPUProcessMainWin.cpp (0 => 270175)


--- trunk/Source/WebKit/GPUProcess/win/GPUProcessMainWin.cpp	                        (rev 0)
+++ trunk/Source/WebKit/GPUProcess/win/GPUProcessMainWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GPUProcessMain.h"
+
+#if ENABLE(GPU_PROCESS)
+
+#include "AuxiliaryProcessMain.h"
+#include "GPUProcess.h"
+
+namespace WebKit {
+
+static RefPtr<GPUProcess> globalGPUProcess;
+
+class GPUProcessMainPlayStation final: public AuxiliaryProcessMainBase {
+public:
+    bool platformInitialize() override
+    {
+        return true;
+    }
+};
+
+template<>
+void initializeAuxiliaryProcess<GPUProcess>(AuxiliaryProcessInitializationParameters&& parameters)
+{
+    static NeverDestroyed<GPUProcess> gpuProcess(WTFMove(parameters));
+    globalGPUProcess = &gpuProcess.get();
+}
+
+int GPUProcessMain(int argc, char** argv)
+{
+    return AuxiliaryProcessMain<GPUProcess, GPUProcessMainPlayStation>(argc, argv);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS)

Added: trunk/Source/WebKit/GPUProcess/win/GPUProcessWin.cpp (0 => 270175)


--- trunk/Source/WebKit/GPUProcess/win/GPUProcessWin.cpp	                        (rev 0)
+++ trunk/Source/WebKit/GPUProcess/win/GPUProcessWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GPUProcess.h"
+
+#if ENABLE(GPU_PROCESS)
+
+#include "GPUProcessCreationParameters.h"
+
+namespace WebKit {
+
+void GPUProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&)
+{
+}
+
+void GPUProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&)
+{
+}
+
+void GPUProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS)

Modified: trunk/Source/WebKit/PlatformWin.cmake (270174 => 270175)


--- trunk/Source/WebKit/PlatformWin.cmake	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebKit/PlatformWin.cmake	2020-11-27 02:18:30 UTC (rev 270175)
@@ -9,6 +9,11 @@
 add_definitions(-DBUILDING_WEBKIT)
 
 list(APPEND WebKit_SOURCES
+    GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp
+
+    GPUProcess/win/GPUProcessMainWin.cpp
+    GPUProcess/win/GPUProcessWin.cpp
+
     NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
 
     NetworkProcess/WebStorage/StorageManager.cpp
@@ -33,7 +38,9 @@
     Shared/win/NativeWebMouseEventWin.cpp
     Shared/win/NativeWebTouchEventWin.cpp
     Shared/win/NativeWebWheelEventWin.cpp
+    Shared/win/WebCoreArgumentCodersWin.cpp
     Shared/win/WebEventFactory.cpp
+    Shared/win/WebPreferencesDefaultValuesWin.cpp
 
     UIProcess/BackingStore.cpp
     UIProcess/DefaultUndoController.cpp
@@ -65,6 +72,8 @@
     UIProcess/win/WebProcessPoolWin.cpp
     UIProcess/win/WebView.cpp
 
+    WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp
+
     WebProcess/InjectedBundle/win/InjectedBundleWin.cpp
 
     WebProcess/Inspector/win/WebInspectorUIWin.cpp

Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (270174 => 270175)


--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-11-27 02:18:30 UTC (rev 270175)
@@ -35,7 +35,7 @@
 
 namespace WebKit {
 
-#if PLATFORM(COCOA) && HAVE(SYSTEM_FEATURE_FLAGS)
+#if HAVE(SYSTEM_FEATURE_FLAGS)
 bool isFeatureFlagEnabled(const String&);
 #endif
 

Modified: trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp (270174 => 270175)


--- trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -30,8 +30,6 @@
 #include <WebCore/CertificateInfo.h>
 #include <WebCore/CurlProxySettings.h>
 #include <WebCore/DictionaryPopupInfo.h>
-#include <WebCore/Font.h>
-#include <WebCore/FontAttributes.h>
 #include <WebCore/ProtectionSpace.h>
 #include <WebCore/ResourceError.h>
 #include <WebCore/ResourceRequest.h>
@@ -213,17 +211,6 @@
     return CurlProxySettings { WTFMove(url), WTFMove(ignoreHosts) };
 }
 
-void ArgumentCoder<FontAttributes>::encodePlatformData(Encoder&, const FontAttributes&)
-{
-    ASSERT_NOT_REACHED();
-}
-
-Optional<FontAttributes> ArgumentCoder<FontAttributes>::decodePlatformData(Decoder&, FontAttributes&)
-{
-    ASSERT_NOT_REACHED();
-    return WTF::nullopt;
-}
-
 void ArgumentCoder<DictionaryPopupInfo>::encodePlatformData(Encoder&, const DictionaryPopupInfo&)
 {
     ASSERT_NOT_REACHED();
@@ -235,17 +222,6 @@
     return false;
 }
 
-void ArgumentCoder<Ref<Font>>::encodePlatformData(Encoder&, const Ref<Font>&)
-{
-    ASSERT_NOT_REACHED();
-}
-
-Optional<FontPlatformData> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder&)
-{
-    ASSERT_NOT_REACHED();
-    return WTF::nullopt;
-}
-
 #if ENABLE(VIDEO)
 void ArgumentCoder<SerializedPlatformDataCueValue>::encodePlatformData(Encoder& encoder, const SerializedPlatformDataCueValue& value)
 {

Added: trunk/Source/WebKit/Shared/win/WebCoreArgumentCodersWin.cpp (0 => 270175)


--- trunk/Source/WebKit/Shared/win/WebCoreArgumentCodersWin.cpp	                        (rev 0)
+++ trunk/Source/WebKit/Shared/win/WebCoreArgumentCodersWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebCoreArgumentCoders.h"
+
+#include <WebCore/Font.h>
+#include <WebCore/FontAttributes.h>
+#include <WebCore/FontCache.h>
+#include <WebCore/FontDescription.h>
+#include <wtf/win/GDIObject.h>
+
+namespace IPC {
+
+using namespace WebCore;
+
+void ArgumentCoder<FontAttributes>::encodePlatformData(Encoder&, const FontAttributes&)
+{
+    ASSERT_NOT_REACHED();
+}
+
+Optional<FontAttributes> ArgumentCoder<FontAttributes>::decodePlatformData(Decoder&, FontAttributes&)
+{
+    ASSERT_NOT_REACHED();
+    return WTF::nullopt;
+}
+
+void ArgumentCoder<Ref<Font>>::encodePlatformData(Encoder& encoder, const Ref<Font>& font)
+{
+    const auto& platformData = font->platformData();
+    encoder << platformData.orientation();
+    encoder << platformData.widthVariant();
+    encoder << platformData.textRenderingMode();
+    encoder << platformData.size();
+    encoder << platformData.syntheticBold();
+    encoder << platformData.syntheticOblique();
+    encoder << platformData.familyName();
+}
+
+Optional<FontPlatformData> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder& decoder)
+{
+    Optional<FontOrientation> orientation;
+    decoder >> orientation;
+    if (!orientation.hasValue())
+        return WTF::nullopt;
+
+    Optional<FontWidthVariant> widthVariant;
+    decoder >> widthVariant;
+    if (!widthVariant.hasValue())
+        return WTF::nullopt;
+
+    Optional<TextRenderingMode> textRenderingMode;
+    decoder >> textRenderingMode;
+    if (!textRenderingMode.hasValue())
+        return WTF::nullopt;
+
+    Optional<float> size;
+    decoder >> size;
+    if (!size.hasValue())
+        return WTF::nullopt;
+
+    Optional<bool> syntheticBold;
+    decoder >> syntheticBold;
+    if (!syntheticBold.hasValue())
+        return WTF::nullopt;
+
+    Optional<bool> syntheticOblique;
+    decoder >> syntheticOblique;
+    if (!syntheticOblique.hasValue())
+        return WTF::nullopt;
+
+    Optional<String> familyName;
+    decoder >> familyName;
+    if (!familyName.hasValue())
+        return WTF::nullopt;
+
+    FontDescription description;
+    description.setOrientation(*orientation);
+    description.setWidthVariant(*widthVariant);
+    description.setTextRenderingMode(*textRenderingMode);
+    description.setComputedSize(*size);
+    RefPtr<Font> font = FontCache::singleton().fontForFamily(description, *familyName);
+    if (!font)
+        return WTF::nullopt;
+    
+    LOGFONT logFont;
+    GetObject(font->platformData().hfont(), sizeof logFont, &logFont);
+    auto gdiFont = adoptGDIObject(CreateFontIndirect(&logFont));
+    if (!gdiFont)
+        return WTF::nullopt;
+    
+    return FontPlatformData(WTFMove(gdiFont), *size, *syntheticBold, *syntheticOblique, false);
+}
+
+} // namespace IPC

Added: trunk/Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp (0 => 270175)


--- trunk/Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp	                        (rev 0)
+++ trunk/Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebPreferencesDefaultValues.h"
+
+#if HAVE(SYSTEM_FEATURE_FLAGS)
+
+#include <wtf/WindowsExtras.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+bool isFeatureFlagEnabled(const String& featureName)
+{
+    DWORD data;
+    DWORD dataSize = sizeof data;
+    DWORD keyType;
+    HRESULT hr = getRegistryValue(HKEY_CURRENT_USER, L"Software\\WebKit", featureName.wideCharacters().data(), &keyType, &data, &dataSize);
+    if (hr != ERROR_SUCCESS)
+        return false;
+    if (keyType != REG_DWORD)
+        return false;
+    if (dataSize != sizeof data)
+        return false;
+    return data;
+}
+
+} // namespace WebKit
+
+#endif

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp (270174 => 270175)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -158,7 +158,7 @@
         m_identifiersOfHandlesAvailableForWriting.add(handle.identifier);
 
         auto* sharedHandle = m_sharedDisplayListHandles.get(handle.identifier);
-        RELEASE_ASSERT_WITH_MESSAGE(sharedHandle, "%s failed to find shared display list", __PRETTY_FUNCTION__);
+        RELEASE_ASSERT_WITH_MESSAGE(sharedHandle, "%s failed to find shared display list", WTF_PRETTY_FUNCTION);
 
         bool unreadCountWasEmpty = sharedHandle->advance(handle.capacity) == handle.capacity;
         if (isFirstHandle && unreadCountWasEmpty)
@@ -228,7 +228,7 @@
     while (!m_identifiersOfReusableHandles.isEmpty()) {
         auto identifier = m_identifiersOfReusableHandles.first();
         auto* reusableHandle = m_sharedDisplayListHandles.get(identifier);
-        RELEASE_ASSERT_WITH_MESSAGE(reusableHandle, "%s failed to find shared display list", __PRETTY_FUNCTION__);
+        RELEASE_ASSERT_WITH_MESSAGE(reusableHandle, "%s failed to find shared display list", WTF_PRETTY_FUNCTION);
 
         if (m_identifiersOfHandlesAvailableForWriting.contains(identifier) && reusableHandle->availableCapacity() >= capacity) {
             m_identifiersOfHandlesAvailableForWriting.remove(identifier);

Added: trunk/Source/WebKit/WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp (0 => 270175)


--- trunk/Source/WebKit/WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp	                        (rev 0)
+++ trunk/Source/WebKit/WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp	2020-11-27 02:18:30 UTC (rev 270175)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "VideoLayerRemote.h"
+
+#if ENABLE(GPU_PROCESS)
+
+#include <WebCore/NotImplemented.h>
+#include <WebCore/TextureMapperPlatformLayer.h>
+
+namespace WebKit {
+
+PlatformLayerContainer createVideoLayerRemote(MediaPlayerPrivateRemote* mediaPlayerPrivateRemote, LayerHostingContextID contextId)
+{
+    notImplemented();
+    return nullptr;
+}
+
+}
+
+#endif

Modified: trunk/Source/cmake/OptionsWin.cmake (270174 => 270175)


--- trunk/Source/cmake/OptionsWin.cmake	2020-11-27 02:14:59 UTC (rev 270174)
+++ trunk/Source/cmake/OptionsWin.cmake	2020-11-27 02:18:30 UTC (rev 270175)
@@ -76,6 +76,7 @@
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_APPLICATION_MANIFEST PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_TYPED_OM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GPU_PROCESS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYOUT_FORMATTING_CONTEXT PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REMOTE_INSPECTOR PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_LOAD_STATISTICS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to