⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 270175 in webkit


Ignore:
Timestamp:
Nov 26, 2020, 6:18:30 PM (6 years ago)
Author:
Fujii Hironori
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.
Location:
trunk
Files:
9 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r270169 r270175  
     12020-11-26  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [WinCairo] Enable GPU process
     4        https://bugs.webkit.org/show_bug.cgi?id=219294
     5
     6        Reviewed by Don Olmstead.
     7
     8        * Source/cmake/OptionsWin.cmake: Turned ENABLE_GPU_PROCESS on for WinCairo.
     9
    1102020-11-26  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
    211
  • trunk/Source/WTF/ChangeLog

    r270166 r270175  
     12020-11-26  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [WinCairo] Enable GPU process
     4        https://bugs.webkit.org/show_bug.cgi?id=219294
     5
     6        Reviewed by Don Olmstead.
     7
     8        * wtf/PlatformHave.h: Turned HAVE_SYSTEM_FEATURE_FLAGS on for Windows.
     9
    1102020-11-26  Michael Catanzaro  <mcatanzaro@gnome.org>
    211
  • trunk/Source/WTF/wtf/PlatformHave.h

    r270052 r270175  
    600600#endif
    601601
    602 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
     602#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(WIN)
    603603#define HAVE_SYSTEM_FEATURE_FLAGS 1
    604604#endif
  • trunk/Source/WebCore/ChangeLog

    r270172 r270175  
     12020-11-26  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [WinCairo] Enable GPU process
     4        https://bugs.webkit.org/show_bug.cgi?id=219294
     5
     6        Reviewed by Don Olmstead.
     7
     8        * platform/graphics/FontPlatformData.cpp:
     9        * platform/graphics/win/FontPlatformDataCairoWin.cpp:
     10        (WebCore::FontPlatformData::familyName const): Added.
     11
    1122020-11-26  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
    213
  • trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp

    r267930 r270175  
    8282#endif
    8383
    84 #if !USE(CORE_TEXT)
     84#if !USE(CORE_TEXT) && !PLATFORM(WIN)
    8585
    8686String FontPlatformData::familyName() const
  • trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp

    r267077 r270175  
    66 * Copyright (C) 2007 Alp Toker
    77 * Copyright (C) 2008, 2010, 2011 Brent Fulgham
     8 * Copyright (C) 2020 Sony Interactive Entertainment Inc.
    89 *
    910 * This library is free software; you can redistribute it and/or
     
    2728#include "FontPlatformData.h"
    2829
     30#include "HWndDC.h"
    2931#include "SharedBuffer.h"
    3032#include <wtf/HashMap.h>
     
    109111#endif
    110112
     113String FontPlatformData::familyName() const
     114{
     115    HWndDC hdc(0);
     116    SaveDC(hdc);
     117    cairo_win32_scaled_font_select_font(scaledFont(), hdc);
     118    wchar_t faceName[LF_FACESIZE];
     119    GetTextFace(hdc, LF_FACESIZE, faceName);
     120    cairo_win32_scaled_font_done_font(scaledFont());
     121    RestoreDC(hdc, -1);
     122    return faceName;
    111123}
     124
     125}
  • trunk/Source/WebKit/ChangeLog

    r270171 r270175  
     12020-11-26  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [WinCairo] Enable GPU process
     4        https://bugs.webkit.org/show_bug.cgi?id=219294
     5
     6        Reviewed by Don Olmstead.
     7
     8        Added stub functions to build GPU process.
     9
     10        Invoke the following command to enable GPU process:
     11        > reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 1 /f
     12
     13        Invoke the following command to disable GPU process:
     14        > reg delete HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /f
     15
     16        * GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp: Added.
     17        (WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
     18        (WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
     19        (WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
     20        (WebKit::RemoteMediaPlayerProxy::enterFullscreen):
     21        (WebKit::RemoteMediaPlayerProxy::exitFullscreen):
     22        * GPUProcess/win/GPUProcessMainWin.cpp: Added.
     23        (WebKit::initializeAuxiliaryProcess<GPUProcess>):
     24        (WebKit::GPUProcessMain):
     25        * GPUProcess/win/GPUProcessWin.cpp: Added.
     26        (WebKit::GPUProcess::initializeProcess):
     27        (WebKit::GPUProcess::initializeProcessName):
     28        (WebKit::GPUProcess::initializeSandbox):
     29        * PlatformWin.cmake:
     30        * Shared/WebPreferencesDefaultValues.h:
     31        * Shared/curl/WebCoreArgumentCodersCurl.cpp:
     32        (IPC::ArgumentCoder<FontAttributes>::encodePlatformData): Deleted.
     33        (IPC::ArgumentCoder<FontAttributes>::decodePlatformData): Deleted.
     34        (IPC::ArgumentCoder<Ref<Font>>::encodePlatformData): Deleted.
     35        (IPC::ArgumentCoder<Ref<Font>>::decodePlatformData): Deleted.
     36        * Shared/win/WebCoreArgumentCodersWin.cpp: Added.
     37        (IPC::ArgumentCoder<FontAttributes>::encodePlatformData):
     38        (IPC::ArgumentCoder<FontAttributes>::decodePlatformData):
     39        (IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
     40        (IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):
     41        * Shared/win/WebPreferencesDefaultValuesWin.cpp: Added.
     42        (WebKit::isFeatureFlagEnabled):
     43        * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
     44        (WebKit::RemoteRenderingBackendProxy::submitDisplayList):
     45        (WebKit::RemoteRenderingBackendProxy::createItemBuffer):
     46        * WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp: Added.
     47        (WebKit::createVideoLayerRemote):
     48
    1492020-11-26  Youenn Fablet  <youenn@apple.com>
    250
  • trunk/Source/WebKit/PlatformWin.cmake

    r268458 r270175  
    1010
    1111list(APPEND WebKit_SOURCES
     12    GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp
     13
     14    GPUProcess/win/GPUProcessMainWin.cpp
     15    GPUProcess/win/GPUProcessWin.cpp
     16
    1217    NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
    1318
     
    3439    Shared/win/NativeWebTouchEventWin.cpp
    3540    Shared/win/NativeWebWheelEventWin.cpp
     41    Shared/win/WebCoreArgumentCodersWin.cpp
    3642    Shared/win/WebEventFactory.cpp
     43    Shared/win/WebPreferencesDefaultValuesWin.cpp
    3744
    3845    UIProcess/BackingStore.cpp
     
    6572    UIProcess/win/WebProcessPoolWin.cpp
    6673    UIProcess/win/WebView.cpp
     74
     75    WebProcess/GPU/media/win/VideoLayerRemoteWin.cpp
    6776
    6877    WebProcess/InjectedBundle/win/InjectedBundleWin.cpp
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h

    r270152 r270175  
    3636namespace WebKit {
    3737
    38 #if PLATFORM(COCOA) && HAVE(SYSTEM_FEATURE_FLAGS)
     38#if HAVE(SYSTEM_FEATURE_FLAGS)
    3939bool isFeatureFlagEnabled(const String&);
    4040#endif
  • trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp

    r267930 r270175  
    3131#include <WebCore/CurlProxySettings.h>
    3232#include <WebCore/DictionaryPopupInfo.h>
    33 #include <WebCore/Font.h>
    34 #include <WebCore/FontAttributes.h>
    3533#include <WebCore/ProtectionSpace.h>
    3634#include <WebCore/ResourceError.h>
     
    214212}
    215213
    216 void ArgumentCoder<FontAttributes>::encodePlatformData(Encoder&, const FontAttributes&)
    217 {
    218     ASSERT_NOT_REACHED();
    219 }
    220 
    221 Optional<FontAttributes> ArgumentCoder<FontAttributes>::decodePlatformData(Decoder&, FontAttributes&)
    222 {
    223     ASSERT_NOT_REACHED();
    224     return WTF::nullopt;
    225 }
    226 
    227214void ArgumentCoder<DictionaryPopupInfo>::encodePlatformData(Encoder&, const DictionaryPopupInfo&)
    228215{
     
    234221    ASSERT_NOT_REACHED();
    235222    return false;
    236 }
    237 
    238 void ArgumentCoder<Ref<Font>>::encodePlatformData(Encoder&, const Ref<Font>&)
    239 {
    240     ASSERT_NOT_REACHED();
    241 }
    242 
    243 Optional<FontPlatformData> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder&)
    244 {
    245     ASSERT_NOT_REACHED();
    246     return WTF::nullopt;
    247223}
    248224
  • trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp

    r269969 r270175  
    159159
    160160        auto* sharedHandle = m_sharedDisplayListHandles.get(handle.identifier);
    161         RELEASE_ASSERT_WITH_MESSAGE(sharedHandle, "%s failed to find shared display list", __PRETTY_FUNCTION__);
     161        RELEASE_ASSERT_WITH_MESSAGE(sharedHandle, "%s failed to find shared display list", WTF_PRETTY_FUNCTION);
    162162
    163163        bool unreadCountWasEmpty = sharedHandle->advance(handle.capacity) == handle.capacity;
     
    229229        auto identifier = m_identifiersOfReusableHandles.first();
    230230        auto* reusableHandle = m_sharedDisplayListHandles.get(identifier);
    231         RELEASE_ASSERT_WITH_MESSAGE(reusableHandle, "%s failed to find shared display list", __PRETTY_FUNCTION__);
     231        RELEASE_ASSERT_WITH_MESSAGE(reusableHandle, "%s failed to find shared display list", WTF_PRETTY_FUNCTION);
    232232
    233233        if (m_identifiersOfHandlesAvailableForWriting.contains(identifier) && reusableHandle->availableCapacity() >= capacity) {
  • trunk/Source/cmake/OptionsWin.cmake

    r270120 r270175  
    7777    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
    7878    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_TYPED_OM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     79    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GPU_PROCESS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
    7980    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYOUT_FORMATTING_CONTEXT PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
    8081    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REMOTE_INSPECTOR PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
Note: See TracChangeset for help on using the changeset viewer.