Changeset 245807 in webkit
- Timestamp:
- May 27, 2019, 11:36:34 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 49 edited
-
ChangeLog (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/PlatformGTK.cmake (modified) (3 diffs)
-
Source/WebCore/SourcesGTK.txt (modified) (2 diffs)
-
Source/WebCore/platform/graphics/GLContext.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/PlatformDisplay.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/PlatformDisplay.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/egl/GLContextEGL.h (modified) (4 diffs)
-
Source/WebCore/platform/graphics/egl/GLContextEGLLibWPE.cpp (modified) (3 diffs)
-
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.h (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/PlatformGTK.cmake (modified) (2 diffs)
-
Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (modified) (1 diff)
-
Source/WebKit/Shared/WebPageCreationParameters.cpp (modified) (2 diffs)
-
Source/WebKit/Shared/WebPageCreationParameters.h (modified) (1 diff)
-
Source/WebKit/Shared/WebProcessCreationParameters.cpp (modified) (2 diffs)
-
Source/WebKit/Shared/WebProcessCreationParameters.h (modified) (1 diff)
-
Source/WebKit/SourcesGTK.txt (modified) (1 diff)
-
Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/API/gtk/PageClientImpl.h (modified) (1 diff)
-
Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h (modified) (1 diff)
-
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/PageClient.h (modified) (1 diff)
-
Source/WebKit/UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/WebProcessPool.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp (modified) (3 diffs)
-
Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h (modified) (1 diff)
-
Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp (modified) (6 diffs)
-
Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h (modified) (3 diffs)
-
Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp (modified) (3 diffs)
-
Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/gtk/WaylandCompositor.h (modified) (2 diffs)
-
Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp (modified) (2 diffs)
-
Source/WebKit/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.h (modified) (2 diffs)
-
Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp (modified) (3 diffs)
-
Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.h (modified) (3 diffs)
-
Source/WebKit/WebProcess/WebProcess.h (modified) (2 diffs)
-
Source/WebKit/WebProcess/glib/WebProcessGLib.cpp (modified) (2 diffs)
-
Source/cmake/OptionsGTK.cmake (modified) (3 diffs)
-
Source/cmake/OptionsPlayStation.cmake (modified) (1 diff)
-
Source/cmake/OptionsWPE.cmake (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/gtk/jhbuild.modules (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r245790 r245807 1 2019-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Use WPEBackend-fdo for accelerating compositing in Wayland instead of the nested compositor 4 https://bugs.webkit.org/show_bug.cgi?id=197944 5 6 Reviewed by Michael Catanzaro. 7 8 Add USE_WPE_RENDERER option to use WPEBackend-fdo. 9 10 * Source/cmake/OptionsGTK.cmake: 11 * Source/cmake/OptionsPlayStation.cmake: 12 * Source/cmake/OptionsWPE.cmake: 13 1 14 2019-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r245802 r245807 1 2019-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Use WPEBackend-fdo for accelerating compositing in Wayland instead of the nested compositor 4 https://bugs.webkit.org/show_bug.cgi?id=197944 5 6 Reviewed by Michael Catanzaro. 7 8 * PlatformGTK.cmake: 9 * SourcesGTK.txt: 10 * platform/graphics/GLContext.cpp: 11 (WebCore::GLContext::createContextForWindow): Check current display is X11 before trying to create a GLX context. 12 * platform/graphics/PlatformDisplay.cpp: 13 (WebCore::PlatformDisplay::createPlatformDisplay): Use USE(WPE_RENDERER) instead of USE(LIBWPE). 14 * platform/graphics/PlatformDisplay.h: 15 * platform/graphics/egl/GLContextEGL.cpp: 16 (WebCore::GLContextEGL::createWindowContext): Use USE(WPE_RENDERER) instead of PLATFORM(WPE). 17 (WebCore::GLContextEGL::createContext): Ditto. 18 (WebCore::GLContextEGL::createSharingContext): Ditto. 19 (WebCore::GLContextEGL::~GLContextEGL): Ditto. 20 * platform/graphics/egl/GLContextEGL.h: 21 * platform/graphics/egl/GLContextEGLLibWPE.cpp: 22 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 23 (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto. 24 * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp: 25 (WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE): In GTK port set the display as the shared one for compositing. 26 * platform/graphics/libwpe/PlatformDisplayLibWPE.h: 27 1 28 2019-05-27 Takashi Komori <Takashi.Komori@sony.com> 2 29 -
trunk/Source/WebCore/PlatformGTK.cmake
r245179 r245807 37 37 ) 38 38 39 if (USE_WPE_RENDERER) 40 list(APPEND WebCore_INCLUDE_DIRECTORIES 41 "${WEBCORE_DIR}/platform/graphics/libwpe" 42 ) 43 endif () 44 39 45 list(APPEND WebCorePlatformGTK_SOURCES 40 46 editing/gtk/EditorGtk.cpp … … 121 127 ) 122 128 129 if (USE_WPE_RENDERER) 130 list(APPEND WebCore_LIBRARIES 131 ${WPE_LIBRARIES} 132 ) 133 endif () 134 123 135 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 124 136 ${ATK_INCLUDE_DIRS} … … 133 145 ) 134 146 147 if (USE_WPE_RENDERER) 148 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 149 ${WPE_INCLUDE_DIRS} 150 ) 151 endif () 152 135 153 if (USE_OPENGL_ES) 136 154 list(APPEND WebCore_SOURCES -
trunk/Source/WebCore/SourcesGTK.txt
r243970 r245807 68 68 69 69 platform/graphics/egl/GLContextEGL.cpp 70 platform/graphics/egl/GLContextEGLLibWPE.cpp 70 71 platform/graphics/egl/GLContextEGLWayland.cpp @no-unify 71 72 platform/graphics/egl/GLContextEGLX11.cpp @no-unify … … 74 75 75 76 platform/graphics/gstreamer/ImageGStreamerCairo.cpp 77 78 platform/graphics/libwpe/PlatformDisplayLibWPE.cpp 76 79 77 80 platform/graphics/opengl/Extensions3DOpenGLCommon.cpp -
trunk/Source/WebCore/platform/graphics/GLContext.cpp
r245088 r245807 91 91 92 92 #if USE(GLX) 93 if (auto glxContext = GLContextGLX::createContext(windowHandle, display)) 94 return glxContext; 93 if (display.type() == PlatformDisplay::Type::X11) { 94 if (auto glxContext = GLContextGLX::createContext(windowHandle, display)) 95 return glxContext; 96 } 95 97 #endif 96 98 #if USE(EGL) -
trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp
r238492 r245807 43 43 #endif 44 44 45 #if USE( LIBWPE)45 #if USE(WPE_RENDERER) 46 46 #include "PlatformDisplayLibWPE.h" 47 47 #endif … … 92 92 #endif // PLATFORM(GTK) 93 93 94 #if USE( LIBWPE)94 #if USE(WPE_RENDERER) 95 95 return PlatformDisplayLibWPE::create(); 96 96 #elif PLATFORM(WIN) -
trunk/Source/WebCore/platform/graphics/PlatformDisplay.h
r238282 r245807 55 55 Windows, 56 56 #endif 57 #if USE( LIBWPE)57 #if USE(WPE_RENDERER) 58 58 WPE, 59 59 #endif -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
r245088 r245807 183 183 surface = createWindowSurfaceWayland(display, config, window); 184 184 #endif 185 #elif PLATFORM(WPE) 185 #endif 186 187 #if USE(WPE_RENDERER) 186 188 if (platformDisplay.type() == PlatformDisplay::Type::WPE) 187 189 surface = createWindowSurfaceWPE(display, config, window); … … 280 282 context = createWaylandContext(platformDisplay, eglSharingContext); 281 283 #endif 282 #if PLATFORM(WPE)284 #if USE(WPE_RENDERER) 283 285 if (platformDisplay.type() == PlatformDisplay::Type::WPE) 284 286 context = createWPEContext(platformDisplay, eglSharingContext); … … 317 319 context = createWaylandContext(platformDisplay); 318 320 #endif 319 #if PLATFORM(WPE)321 #if USE(WPE_RENDERER) 320 322 if (platformDisplay.type() == PlatformDisplay::Type::WPE) 321 323 context = createWPEContext(platformDisplay); … … 360 362 destroyWaylandWindow(); 361 363 #endif 362 #if PLATFORM(WPE)364 #if USE(WPE_RENDERER) 363 365 destroyWPETarget(); 364 366 #endif -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h
r238282 r245807 33 33 #endif 34 34 35 #if USE( LIBWPE)35 #if USE(WPE_RENDERER) 36 36 struct wpe_renderer_backend_egl_offscreen_target; 37 37 #endif … … 83 83 void destroyWaylandWindow(); 84 84 #endif 85 #if USE( LIBWPE)85 #if USE(WPE_RENDERER) 86 86 GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, struct wpe_renderer_backend_egl_offscreen_target*); 87 87 void destroyWPETarget(); … … 99 99 static EGLSurface createWindowSurfaceWayland(EGLDisplay, EGLConfig, GLNativeWindowType); 100 100 #endif 101 #if USE( LIBWPE)101 #if USE(WPE_RENDERER) 102 102 static std::unique_ptr<GLContextEGL> createWPEContext(PlatformDisplay&, EGLContext sharingContext = nullptr); 103 103 static EGLSurface createWindowSurfaceWPE(EGLDisplay, EGLConfig, GLNativeWindowType); … … 116 116 struct wl_egl_window* m_wlWindow { nullptr }; 117 117 #endif 118 #if USE( LIBWPE)118 #if USE(WPE_RENDERER) 119 119 struct wpe_renderer_backend_egl_offscreen_target* m_wpeTarget { nullptr }; 120 120 #endif -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGLLibWPE.cpp
r243284 r245807 20 20 #include "GLContextEGL.h" 21 21 22 #if USE(EGL) && USE(LIBWPE) 23 22 #if USE(EGL) && USE(WPE_RENDERER) 24 23 #include "PlatformDisplayLibWPE.h" 25 24 … … 30 29 #include "EpoxyEGL.h" 31 30 #else 31 #if PLATFORM(WAYLAND) 32 // These includes need to be in this order because wayland-egl.h defines WL_EGL_PLATFORM 33 // and eglplatform.h, included by egl.h, checks that to decide whether it's Wayland platform. 34 #include <wayland-egl.h> 35 #endif 32 36 #include <EGL/egl.h> 33 37 #endif … … 97 101 } // namespace WebCore 98 102 99 #endif // USE(EGL) && USE( LIBWPE)103 #endif // USE(EGL) && USE(WPE_RENDERER) -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r243690 r245807 103 103 #if PLATFORM(WAYLAND) 104 104 #include "PlatformDisplayWayland.h" 105 #elif PLATFORM(WPE) 105 #endif 106 107 #if USE(WPE_RENDERER) 106 108 #include "PlatformDisplayLibWPE.h" 107 109 #endif … … 449 451 #endif 450 452 451 #if PLATFORM(WPE)453 #if USE(WPE_RENDERER) 452 454 ASSERT(is<PlatformDisplayLibWPE>(sharedDisplay)); 453 455 GST_DEBUG_OBJECT(pipeline(), "Creating WPE shared EGL display"); -
trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
r238282 r245807 27 27 #include "PlatformDisplayLibWPE.h" 28 28 29 #if USE( LIBWPE)29 #if USE(WPE_RENDERER) 30 30 31 31 #include "GLContextEGL.h" … … 37 37 #include "EpoxyEGL.h" 38 38 #else 39 #if PLATFORM(WAYLAND) 40 // These includes need to be in this order because wayland-egl.h defines WL_EGL_PLATFORM 41 // and eglplatform.h, included by egl.h, checks that to decide whether it's Wayland platform. 42 #include <wayland-egl.h> 43 #endif 39 44 #include <EGL/egl.h> 40 45 #endif … … 52 57 : PlatformDisplay(NativeDisplayOwned::No) 53 58 { 59 #if PLATFORM(GTK) 60 PlatformDisplay::setSharedDisplayForCompositing(*this); 61 #endif 54 62 } 55 63 … … 74 82 } // namespace WebCore 75 83 76 #endif // USE( LIBWPE)84 #endif // USE(WPE_RENDERER) -
trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.h
r238282 r245807 26 26 #pragma once 27 27 28 #if USE( LIBWPE)28 #if USE(WPE_RENDERER) 29 29 30 30 #include "PlatformDisplay.h" … … 56 56 SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY(PlatformDisplayLibWPE, WPE) 57 57 58 #endif // USE( LIBWPE)58 #endif // USE(WPE_RENDERER) -
trunk/Source/WebKit/ChangeLog
r245803 r245807 1 2019-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Use WPEBackend-fdo for accelerating compositing in Wayland instead of the nested compositor 4 https://bugs.webkit.org/show_bug.cgi?id=197944 5 6 Reviewed by Michael Catanzaro. 7 8 The WPEBackend-fdo implementation is quite similar to our Wayland nested compositor, but more efficient (using 9 linux dmabuf, resource caching, etc.). This allows us to share even more code with WPE port too. 10 11 * PlatformGTK.cmake: 12 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: 13 (WebKit::ThreadedCompositor::forceRepaint): WPE doesn't support force repaint yet. 14 * Shared/WebPageCreationParameters.cpp: 15 (WebKit::WebPageCreationParameters::encode const): Use USE(WPE_RENDERER) instead of PLATFORM(WPE). 16 (WebKit::WebPageCreationParameters::decode): Ditto. 17 * Shared/WebPageCreationParameters.h: 18 * Shared/WebProcessCreationParameters.cpp: 19 (WebKit::WebProcessCreationParameters::encode const): Ditto. 20 (WebKit::WebProcessCreationParameters::decode): Ditto. 21 * Shared/WebProcessCreationParameters.h: 22 * SourcesGTK.txt: 23 * UIProcess/API/gtk/PageClientImpl.cpp: 24 (WebKit::PageClientImpl::hostFileDescriptor): Implement it when using WPE just calling webkitWebViewBaseRenderHostFileDescriptor(). 25 * UIProcess/API/gtk/PageClientImpl.h: 26 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 27 (webkitWebViewBaseCreateWebPage): Initialize the web page after the accelerated backing store is created, since 28 it's used now during intialization. 29 (webkitWebViewBaseRenderHostFileDescriptor): Return AcceleratedBackingStore::renderHostFileDescriptor() 30 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 31 * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: 32 * UIProcess/PageClient.h: 33 * UIProcess/WebPageProxy.cpp: 34 (WebKit::WebPageProxy::creationParameters): Use USE(WPE_RENDERER) instead of PLATFORM(WPE). 35 * UIProcess/WebProcessPool.cpp: 36 (WebKit::WebProcessPool::initializeNewWebProcess): Remove wayland display name initialization. 37 * UIProcess/glib/WebProcessPoolGLib.cpp: 38 (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize wayland display name when not using WPE here 39 now. In case of using WPE, initialize hostClientFileDescriptor and implementationLibraryName. 40 * UIProcess/glib/WebProcessProxyGLib.cpp: 41 (WebKit::WebProcessProxy::platformGetLaunchOptions): Remove unused wayland socket command line process parameter. 42 * UIProcess/gtk/AcceleratedBackingStore.h: 43 (WebKit::AcceleratedBackingStore::renderHostFileDescriptor): Return -1 by default. 44 * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: 45 (WebKit::AcceleratedBackingStoreWayland::create): When using WPE call wpe_fdo_initialize_for_egl_display() and 46 check we have the required extensions. 47 (WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland): When using WPE initialize the view backend. 48 (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland): When using WPE release the EGL images 49 still in use and the view texture. 50 (WebKit::AcceleratedBackingStoreWayland::renderHostFileDescriptor): Call wpe_view_backend_get_renderer_host_fd(). 51 (WebKit::AcceleratedBackingStoreWayland::displayBuffer): Create the view texture if needed, save the pending 52 image and schedule a redraw. 53 (WebKit::AcceleratedBackingStoreWayland::paint): When using WPE commit the pending image and use it as target of 54 the view texture. 55 * UIProcess/gtk/AcceleratedBackingStoreWayland.h: 56 * UIProcess/gtk/HardwareAccelerationManager.cpp: 57 (WebKit::HardwareAccelerationManager::HardwareAccelerationManager): When using WPE disable hardware acceleration 58 if wpe_fdo_initialize_for_egl_display() fails. 59 * UIProcess/gtk/WaylandCompositor.cpp: 60 * UIProcess/gtk/WaylandCompositor.h: 61 * WebProcess/WebPage/AcceleratedSurface.cpp: 62 (WebKit::AcceleratedSurface::create): Create an AcceleratedSurfaceLibWPE for GTK port when using WPE and shared 63 display is Wayland. 64 * WebProcess/WebPage/WebPage.cpp: 65 * WebProcess/WebPage/WebPage.h: 66 * WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp: 67 (WebKit::AcceleratedSurfaceLibWPE::initialize): Use the shared display for compositing instead of shared display. 68 * WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.h: 69 * WebProcess/WebProcess.h: 70 * WebProcess/glib/WebProcessGLib.cpp: 71 (WebKit::WebProcess::platformInitializeWebProcess): Initialize the wpe display when using WPE. 72 1 73 2019-05-27 Wenson Hsieh <wenson_hsieh@apple.com> 2 74 -
trunk/Source/WebKit/PlatformGTK.cmake
r244541 r245807 429 429 ) 430 430 431 if (USE_WPE_RENDERER) 432 list(APPEND WebKit_INCLUDE_DIRECTORIES 433 "${WEBKIT_DIR}/WebProcess/WebPage/libwpe" 434 ) 435 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES 436 ${WPE_INCLUDE_DIRS} 437 ${WPEBACKEND_FDO_INCLUDE_DIRS} 438 ) 439 endif () 440 431 441 if (USE_LIBNOTIFY) 432 442 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES … … 464 474 # WebCore should be specifed before and after WebCorePlatformGTK 465 475 list(APPEND WebKit_LIBRARIES PRIVATE WebCore) 476 477 if (USE_WPE_RENDERER) 478 list(APPEND WebKit_LIBRARIES 479 ${WPE_LIBRARIES} 480 ${WPEBACKEND_FDO_LIBRARIES} 481 ) 482 endif () 466 483 467 484 if (LIBNOTIFY_FOUND) -
trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
r243865 r245807 189 189 // FIXME: Enable this for WPE once it's possible to do these forced updates 190 190 // in a way that doesn't starve out the underlying graphics buffers. 191 #if PLATFORM(GTK) 191 #if PLATFORM(GTK) && !USE(WPE_RENDERER) 192 192 m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] { 193 193 SetForScope<bool> change(m_inForceRepaint, true); -
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
r245799 r245807 104 104 encoder << additionalSupportedImageTypes; 105 105 #endif 106 #if PLATFORM(WPE)106 #if USE(WPE_RENDERER) 107 107 encoder << hostFileDescriptor; 108 108 #endif … … 303 303 #endif 304 304 305 #if PLATFORM(WPE)305 #if USE(WPE_RENDERER) 306 306 if (!decoder.decode(parameters.hostFileDescriptor)) 307 307 return WTF::nullopt; -
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
r245796 r245807 164 164 Vector<String> additionalSupportedImageTypes; 165 165 #endif 166 #if PLATFORM(WPE)166 #if USE(WPE_RENDERER) 167 167 IPC::Attachment hostFileDescriptor; 168 168 #endif -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r243460 r245807 152 152 #endif 153 153 154 #if PLATFORM(WPE)154 #if USE(WPE_RENDERER) 155 155 encoder << isServiceWorkerProcess; 156 156 encoder << hostClientFileDescriptor; … … 372 372 #endif 373 373 374 #if PLATFORM(WPE)374 #if USE(WPE_RENDERER) 375 375 if (!decoder.decode(parameters.isServiceWorkerProcess)) 376 376 return false; -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r243460 r245807 190 190 #endif 191 191 192 #if PLATFORM(WPE)192 #if USE(WPE_RENDERER) 193 193 bool isServiceWorkerProcess { false }; 194 194 IPC::Attachment hostClientFileDescriptor; -
trunk/Source/WebKit/SourcesGTK.txt
r245565 r245807 421 421 WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp 422 422 423 WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp 424 423 425 WebProcess/glib/WebProcessGLib.cpp 424 426 -
trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
r244744 r245807 553 553 } 554 554 555 #if USE(WPE_RENDERER) 556 IPC::Attachment PageClientImpl::hostFileDescriptor() 557 { 558 return webkitWebViewBaseRenderHostFileDescriptor(WEBKIT_WEB_VIEW_BASE(m_viewWidget)); 559 } 560 #endif 561 555 562 } // namespace WebKit -
trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
r244635 r245807 165 165 bool effectiveAppearanceIsDark() const override; 166 166 167 #if USE(WPE_RENDERER) 168 IPC::Attachment hostFileDescriptor() override; 169 #endif 170 167 171 // Members of PageClientImpl class 168 172 GtkWidget* m_viewWidget; -
trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
r245617 r245807 1460 1460 WebProcessPool* processPool = configuration->processPool(); 1461 1461 priv->pageProxy = processPool->createWebPage(*priv->pageClient, WTFMove(configuration)); 1462 priv->acceleratedBackingStore = AcceleratedBackingStore::create(*priv->pageProxy); 1462 1463 priv->pageProxy->initializeWebPage(); 1463 1464 priv->acceleratedBackingStore = AcceleratedBackingStore::create(*priv->pageProxy);1465 1464 1466 1465 priv->inputMethodFilter.setPage(priv->pageProxy.get()); … … 1830 1829 #endif 1831 1830 } 1831 1832 #if USE(WPE_RENDERER) 1833 int webkitWebViewBaseRenderHostFileDescriptor(WebKitWebViewBase* webkitWebViewBase) 1834 { 1835 if (webkitWebViewBase->priv->acceleratedBackingStore) 1836 return webkitWebViewBase->priv->acceleratedBackingStore->renderHostFileDescriptor(); 1837 return -1; 1838 } 1839 #endif -
trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
r245460 r245807 96 96 97 97 void webkitWebViewBaseShowEmojiChooser(WebKitWebViewBase*, const WebCore::IntRect&, CompletionHandler<void(String)>&&); 98 99 #if USE(WPE_RENDERER) 100 int webkitWebViewBaseRenderHostFileDescriptor(WebKitWebViewBase*); 101 #endif -
trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
r243505 r245807 36 36 #include "WebPreferences.h" 37 37 #include "WebProcessProxy.h" 38 #include <WebCore/PlatformDisplay.h> 38 39 #include <WebCore/Region.h> 39 40 40 41 #if PLATFORM(GTK) 41 42 #include <gtk/gtk.h> 42 #endif43 44 #if PLATFORM(WAYLAND)45 #include "WaylandCompositor.h"46 #include <WebCore/PlatformDisplay.h>47 43 #endif 48 44 -
trunk/Source/WebKit/UIProcess/PageClient.h
r245778 r245807 506 506 #endif 507 507 508 #if PLATFORM(WPE)508 #if USE(WPE_RENDERER) 509 509 virtual IPC::Attachment hostFileDescriptor() = 0; 510 510 #endif -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r245796 r245807 7183 7183 parameters.cpuLimit = m_cpuLimit; 7184 7184 7185 #if PLATFORM(WPE)7185 #if USE(WPE_RENDERER) 7186 7186 parameters.hostFileDescriptor = pageClient().hostFileDescriptor(); 7187 7187 #endif -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r245796 r245807 118 118 #endif 119 119 120 #if PLATFORM(WAYLAND)121 #include "WaylandCompositor.h"122 #include <WebCore/PlatformDisplay.h>123 #endif124 125 120 #if PLATFORM(COCOA) 126 121 #include "VersionChecks.h" … … 978 973 #if OS(LINUX) 979 974 parameters.shouldEnableMemoryPressureReliefLogging = true; 980 #endif981 982 #if PLATFORM(WAYLAND) && USE(EGL)983 if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)984 parameters.waylandCompositorDisplayName = WaylandCompositor::singleton().displayName();985 975 #endif 986 976 -
trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
r245676 r245807 32 32 #include "WebProcessCreationParameters.h" 33 33 #include <JavaScriptCore/RemoteInspectorServer.h> 34 #include <WebCore/PlatformDisplay.h> 35 #include <wtf/FileSystem.h> 36 #include <wtf/glib/GUniquePtr.h> 34 37 35 38 #if USE(GSTREAMER) … … 37 40 #endif 38 41 39 #include <wtf/FileSystem.h> 40 #include <wtf/glib/GUniquePtr.h> 42 #if PLATFORM(WAYLAND) 43 #if USE(WPE_RENDERER) 44 #include <wpe/fdo-egl.h> 45 #else 46 #include "WaylandCompositor.h" 47 #endif 48 #endif 41 49 42 #if PLATFORM(WPE)50 #if USE(WPE_RENDERER) 43 51 #include <wpe/wpe.h> 44 52 #endif … … 109 117 #endif 110 118 119 #if PLATFORM(WAYLAND) 120 if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) { 121 #if USE(WPE_RENDERER) 122 wpe_loader_init("libWPEBackend-fdo-1.0.so"); 123 if (wpe_fdo_initialize_for_egl_display(WebCore::PlatformDisplay::sharedDisplay().eglDisplay())) { 124 parameters.hostClientFileDescriptor = wpe_renderer_host_create_client(); 125 parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(wpe_loader_get_loaded_implementation_library_name()); 126 } 127 #else 128 parameters.waylandCompositorDisplayName = WaylandCompositor::singleton().displayName(); 129 #endif 130 } 131 #endif 132 111 133 parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModel::DocumentViewer; 112 134 parameters.proxySettings = m_networkProxySettings; -
trunk/Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp
r243708 r245807 27 27 #include "WebProcessProxy.h" 28 28 29 #if PLATFORM(WAYLAND) && USE(EGL)30 #include "WaylandCompositor.h"31 #endif32 29 #include "WebProcessPool.h" 33 30 #include "WebsiteDataStore.h" … … 48 45 49 46 launchOptions.extraWebProcessSandboxPaths = m_processPool->sandboxPaths(); 50 51 #if PLATFORM(WAYLAND) && USE(EGL)52 if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) {53 String displayName = WaylandCompositor::singleton().displayName();54 String runtimeDir(g_get_user_runtime_dir());55 String waylandSocket = FileSystem::pathByAppendingComponent(runtimeDir, displayName);56 launchOptions.extraInitializationData.set("waylandSocket", waylandSocket);57 }58 #endif59 47 } 60 48 -
trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h
r242082 r245807 48 48 virtual bool paint(cairo_t*, const WebCore::IntRect&) = 0; 49 49 virtual bool makeContextCurrent() { return false; } 50 virtual int renderHostFileDescriptor() { return -1; } 50 51 51 52 protected: -
trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp
r242082 r245807 1 1 /* 2 * Copyright (C) 2016 Igalia S.L.2 * Copyright (C) 2016, 2019 Igalia S.L. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 #if PLATFORM(WAYLAND) && USE(EGL) 30 30 31 #include "WaylandCompositor.h"32 31 #include "WebPageProxy.h" 32 // These includes need to be in this order because wayland-egl.h defines WL_EGL_PLATFORM 33 // and eglplatform.h, included by egl.h, checks that to decide whether it's Wayland platform. 34 #include <gdk/gdkwayland.h> 35 #include <EGL/egl.h> 36 #include <EGL/eglext.h> 33 37 #include <WebCore/CairoUtilities.h> 34 38 #include <WebCore/GLContext.h> … … 36 40 #if USE(OPENGL_ES) 37 41 #include <GLES2/gl2.h> 38 #else 42 #include <GLES2/gl2ext.h> 43 #include <WebCore/Extensions3DOpenGLES.h> 44 #else 45 #include <WebCore/Extensions3DOpenGL.h> 39 46 #include <WebCore/OpenGLShims.h> 47 #endif 48 49 #if USE(WPE_RENDERER) 50 #include <wpe/fdo-egl.h> 51 #else 52 #include "WaylandCompositor.h" 53 #endif 54 55 #if USE(WPE_RENDERER) 56 #if !defined(PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) 57 typedef void (*PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES); 58 #endif 59 60 static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glImageTargetTexture2D; 40 61 #endif 41 62 … … 45 66 std::unique_ptr<AcceleratedBackingStoreWayland> AcceleratedBackingStoreWayland::create(WebPageProxy& webPage) 46 67 { 68 #if USE(WPE_RENDERER) 69 if (!glImageTargetTexture2D) { 70 if (!wpe_fdo_initialize_for_egl_display(PlatformDisplay::sharedDisplay().eglDisplay())) 71 return nullptr; 72 73 std::unique_ptr<WebCore::GLContext> eglContext = GLContext::createOffscreenContext(); 74 if (!eglContext) 75 return nullptr; 76 77 if (!eglContext->makeContextCurrent()) 78 return nullptr; 79 80 #if USE(OPENGL_ES) 81 std::unique_ptr<Extensions3DOpenGLES> glExtensions = std::make_unique<Extensions3DOpenGLES>(nullptr, false); 82 #else 83 std::unique_ptr<Extensions3DOpenGL> glExtensions = std::make_unique<Extensions3DOpenGL>(nullptr, GLContext::current()->version() >= 320); 84 #endif 85 if (glExtensions->supports("GL_OES_EGL_image") || glExtensions->supports("GL_OES_EGL_image_external")) 86 glImageTargetTexture2D = reinterpret_cast<PFNGLEGLIMAGETARGETTEXTURE2DOESPROC>(eglGetProcAddress("glEGLImageTargetTexture2DOES")); 87 } 88 89 if (!glImageTargetTexture2D) { 90 WTFLogAlways("AcceleratedBackingStoreWPE requires glEGLImageTargetTexture2D."); 91 return nullptr; 92 } 93 #else 47 94 if (!WaylandCompositor::singleton().isRunning()) 48 95 return nullptr; 96 #endif 49 97 return std::unique_ptr<AcceleratedBackingStoreWayland>(new AcceleratedBackingStoreWayland(webPage)); 50 98 } … … 53 101 : AcceleratedBackingStore(webPage) 54 102 { 103 #if USE(WPE_RENDERER) 104 static struct wpe_view_backend_exportable_fdo_egl_client exportableClient = { 105 // export_egl_image 106 nullptr, 107 // export_fdo_egl_image 108 [](void* data, struct wpe_fdo_egl_exported_image* image) 109 { 110 static_cast<AcceleratedBackingStoreWayland*>(data)->displayBuffer(image); 111 }, 112 // padding 113 nullptr, nullptr, nullptr 114 }; 115 116 auto viewSize = webPage.viewSize(); 117 m_exportable = wpe_view_backend_exportable_fdo_egl_create(&exportableClient, this, viewSize.width(), viewSize.height()); 118 wpe_view_backend_initialize(wpe_view_backend_exportable_fdo_get_view_backend(m_exportable)); 119 #else 55 120 WaylandCompositor::singleton().registerWebPage(m_webPage); 121 #endif 56 122 } 57 123 58 124 AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland() 59 125 { 126 #if USE(WPE_RENDERER) 127 if (m_pendingImage) 128 wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, m_pendingImage); 129 if (m_committedImage) 130 wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, m_committedImage); 131 if (m_viewTexture) { 132 if (makeContextCurrent()) 133 glDeleteTextures(1, &m_viewTexture); 134 } 135 #else 60 136 WaylandCompositor::singleton().unregisterWebPage(m_webPage); 137 #endif 61 138 62 139 #if GTK_CHECK_VERSION(3, 16, 0) … … 103 180 } 104 181 182 #if USE(WPE_RENDERER) 183 int AcceleratedBackingStoreWayland::renderHostFileDescriptor() 184 { 185 return wpe_view_backend_get_renderer_host_fd(wpe_view_backend_exportable_fdo_get_view_backend(m_exportable)); 186 } 187 188 void AcceleratedBackingStoreWayland::displayBuffer(struct wpe_fdo_egl_exported_image* image) 189 { 190 if (!m_viewTexture) { 191 if (!makeContextCurrent()) 192 return; 193 194 glGenTextures(1, &m_viewTexture); 195 glBindTexture(GL_TEXTURE_2D, m_viewTexture); 196 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 197 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 198 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 199 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 200 } 201 202 if (m_pendingImage) 203 wpe_view_backend_exportable_fdo_egl_dispatch_release_image(m_exportable, m_pendingImage); 204 m_pendingImage = image; 205 206 m_webPage.setViewNeedsDisplay(IntRect(IntPoint::zero(), m_webPage.viewSize())); 207 } 208 #endif 209 105 210 bool AcceleratedBackingStoreWayland::paint(cairo_t* cr, const IntRect& clipRect) 106 211 { 107 212 GLuint texture; 108 213 IntSize textureSize; 214 215 #if USE(WPE_RENDERER) 216 if (!makeContextCurrent()) 217 return false; 218 219 if (m_pendingImage) { 220 wpe_view_backend_exportable_fdo_dispatch_frame_complete(m_exportable); 221 222 if (m_committedImage) 223 wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, m_committedImage); 224 m_committedImage = m_pendingImage; 225 m_pendingImage = nullptr; 226 } 227 228 if (!m_committedImage) 229 return true; 230 231 glBindTexture(GL_TEXTURE_2D, m_viewTexture); 232 glImageTargetTexture2D(GL_TEXTURE_2D, wpe_fdo_egl_exported_image_get_egl_image(m_committedImage)); 233 234 texture = m_viewTexture; 235 textureSize = { static_cast<int>(wpe_fdo_egl_exported_image_get_width(m_committedImage)), static_cast<int>(wpe_fdo_egl_exported_image_get_height(m_committedImage)) }; 236 #else 109 237 if (!WaylandCompositor::singleton().getTexture(m_webPage, texture, textureSize)) 110 238 return false; 239 #endif 111 240 112 241 cairo_save(cr); -
trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h
r240712 r245807 34 34 #include <wtf/glib/GRefPtr.h> 35 35 36 #if USE(WPE_RENDERER) 37 #include <wpe/fdo.h> 38 #endif 39 40 typedef void* EGLImageKHR; 36 41 typedef struct _GdkGLContext GdkGLContext; 42 struct wpe_fdo_egl_exported_image; 37 43 38 44 namespace WebCore { … … 54 60 55 61 void tryEnsureGLContext(); 62 #if USE(WPE_RENDERER) 63 void displayBuffer(struct wpe_fdo_egl_exported_image*); 64 #endif 56 65 57 66 bool paint(cairo_t*, const WebCore::IntRect&) override; 58 67 bool makeContextCurrent() override; 68 #if USE(WPE_RENDERER) 69 int renderHostFileDescriptor() override; 70 #endif 59 71 60 72 RefPtr<cairo_surface_t> m_surface; … … 64 76 #endif 65 77 std::unique_ptr<WebCore::GLContext> m_glContext; 78 79 #if USE(WPE_RENDERER) 80 struct wpe_view_backend_exportable_fdo* m_exportable { nullptr }; 81 unsigned m_viewTexture { 0 }; 82 struct wpe_fdo_egl_exported_image* m_committedImage { nullptr }; 83 struct wpe_fdo_egl_exported_image* m_pendingImage { nullptr }; 84 #endif 66 85 }; 67 86 -
trunk/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp
r241654 r245807 27 27 #include "HardwareAccelerationManager.h" 28 28 29 #include "WaylandCompositor.h"30 29 #include <WebCore/NotImplemented.h> 31 30 #include <WebCore/PlatformDisplay.h> … … 33 32 #if USE(REDIRECTED_XCOMPOSITE_WINDOW) 34 33 #include <WebCore/PlatformDisplayX11.h> 34 #endif 35 36 #if PLATFORM(WAYLAND) 37 #if USE(WPE_RENDERER) 38 #include <wpe/fdo-egl.h> 39 #else 40 #include "WaylandCompositor.h" 41 #endif 35 42 #endif 36 43 … … 72 79 #if PLATFORM(WAYLAND) && USE(EGL) 73 80 if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) { 81 #if USE(WPE_RENDERER) 82 if (!wpe_fdo_initialize_for_egl_display(PlatformDisplay::sharedDisplay().eglDisplay())) { 83 m_canUseHardwareAcceleration = false; 84 return; 85 } 86 #else 74 87 if (!WaylandCompositor::singleton().isRunning()) { 75 88 m_canUseHardwareAcceleration = false; 76 89 return; 77 90 } 91 #endif 78 92 } 79 93 #endif -
trunk/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp
r245796 r245807 27 27 #include "WaylandCompositor.h" 28 28 29 #if PLATFORM(WAYLAND) && USE(EGL) 29 #if PLATFORM(WAYLAND) && USE(EGL) && !USE(WPE_RENDERER) 30 30 31 31 #include "WebKitWaylandServerProtocol.h" … … 577 577 } // namespace WebKit 578 578 579 #endif // PLATFORM(WAYLAND) && USE(EGL) 579 #endif // PLATFORM(WAYLAND) && USE(EGL) && !USE(WPE_RENDERER) -
trunk/Source/WebKit/UIProcess/gtk/WaylandCompositor.h
r245796 r245807 26 26 #pragma once 27 27 28 #if PLATFORM(WAYLAND) && USE(EGL) 28 #if PLATFORM(WAYLAND) && USE(EGL) && !USE(WPE_RENDERER) 29 29 30 30 #include "WebPageProxy.h" … … 130 130 } // namespace WebKit 131 131 132 #endif // PLATFORM(WAYLAND) && USE(EGL) 132 #endif // PLATFORM(WAYLAND) && USE(EGL) && !USE(WPE_RENDERER) -
trunk/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp
r245337 r245807 38 38 #endif 39 39 40 #if USE( LIBWPE)40 #if USE(WPE_RENDERER) 41 41 #include "AcceleratedSurfaceLibWPE.h" 42 42 #endif … … 49 49 #if PLATFORM(WAYLAND) 50 50 if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) 51 #if USE(WPE_RENDERER) 52 return AcceleratedSurfaceLibWPE::create(webPage, client); 53 #else 51 54 return AcceleratedSurfaceWayland::create(webPage, client); 55 #endif 52 56 #endif 53 57 #if USE(REDIRECTED_XCOMPOSITE_WINDOW) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r245796 r245807 424 424 , m_overrideContentSecurityPolicy { parameters.overrideContentSecurityPolicy } 425 425 , m_cpuLimit(parameters.cpuLimit) 426 #if PLATFORM(WPE)426 #if USE(WPE_RENDERER) 427 427 , m_hostFileDescriptor(WTFMove(parameters.hostFileDescriptor)) 428 428 #endif -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r245803 r245807 1156 1156 #endif 1157 1157 1158 #if PLATFORM(WPE)1158 #if USE(WPE_RENDERER) 1159 1159 int releaseHostFileDescriptor() { return m_hostFileDescriptor.releaseFileDescriptor(); } 1160 1160 #endif … … 1918 1918 const Optional<double> m_cpuLimit; 1919 1919 1920 #if PLATFORM(WPE)1920 #if USE(WPE_RENDERER) 1921 1921 IPC::Attachment m_hostFileDescriptor; 1922 1922 #endif -
trunk/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp
r245796 r245807 26 26 #include "config.h" 27 27 #include "AcceleratedSurfaceLibWPE.h" 28 29 #if USE(WPE_RENDERER) 28 30 29 31 #include "WebPage.h" … … 66 68 }; 67 69 wpe_renderer_backend_egl_target_set_client(m_backend, &s_client, this); 68 wpe_renderer_backend_egl_target_initialize(m_backend, downcast<PlatformDisplayLibWPE>(PlatformDisplay::sharedDisplay ()).backend(),70 wpe_renderer_backend_egl_target_initialize(m_backend, downcast<PlatformDisplayLibWPE>(PlatformDisplay::sharedDisplayForCompositing()).backend(), 69 71 std::max(1, m_size.width()), std::max(1, m_size.height())); 70 72 } … … 112 114 } // namespace WebKit 113 115 116 #endif // USE(WPE_RENDERER) -
trunk/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.h
r245337 r245807 26 26 #pragma once 27 27 28 #if PLATFORM(WPE)28 #if USE(WPE_RENDERER) 29 29 30 30 #include "AcceleratedSurface.h" … … 45 45 uint64_t surfaceID() const override; 46 46 void clientResize(const WebCore::IntSize&) override; 47 bool shouldPaintMirrored() const override { return false; } 47 bool shouldPaintMirrored() const override 48 { 49 #if PLATFORM(GTK) 50 return true; 51 #else 52 return false; 53 #endif 54 } 48 55 49 56 void initialize() override; … … 60 67 } // namespace WebKit 61 68 62 #endif // PLATFORM(WPE)69 #endif // USE(WPE_RENDERER) -
trunk/Source/WebKit/WebProcess/WebProcess.h
r245796 r245807 62 62 #if PLATFORM(IOS_FAMILY) 63 63 #include "ProcessTaskStateObserver.h" 64 #endif 65 66 #if PLATFORM(WAYLAND) && USE(WPE_RENDERER) 67 #include <WebCore/PlatformDisplayLibWPE.h> 64 68 #endif 65 69 … … 553 557 std::unique_ptr<WaylandCompositorDisplay> m_waylandCompositorDisplay; 554 558 #endif 559 560 #if PLATFORM(WAYLAND) && USE(WPE_RENDERER) 561 std::unique_ptr<WebCore::PlatformDisplayLibWPE> m_wpeDisplay; 562 #endif 563 555 564 bool m_hasSuspendedPageProxy { false }; 556 565 bool m_isSuspending { false }; -
trunk/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
r245676 r245807 40 40 #endif 41 41 42 #if PLATFORM(WPE)42 #if USE(WPE_RENDERER) 43 43 #include <WebCore/PlatformDisplayLibWPE.h> 44 44 #include <wpe/wpe.h> … … 66 66 } 67 67 #endif 68 68 69 #if PLATFORM(WAYLAND) 69 m_waylandCompositorDisplay = WaylandCompositorDisplay::create(parameters.waylandCompositorDisplayName); 70 if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) { 71 #if USE(WPE_RENDERER) 72 if (!parameters.isServiceWorkerProcess) { 73 auto hostClientFileDescriptor = parameters.hostClientFileDescriptor.releaseFileDescriptor(); 74 if (hostClientFileDescriptor != -1) { 75 wpe_loader_init(parameters.implementationLibraryName.data()); 76 m_wpeDisplay = WebCore::PlatformDisplayLibWPE::create(); 77 m_wpeDisplay->initialize(hostClientFileDescriptor); 78 } 79 } 80 #else 81 m_waylandCompositorDisplay = WaylandCompositorDisplay::create(parameters.waylandCompositorDisplayName); 70 82 #endif 83 } 84 #endif 85 71 86 #if USE(GSTREAMER) 72 87 WebCore::initializeGStreamer(WTFMove(parameters.gstreamerOptions)); -
trunk/Source/cmake/OptionsGTK.cmake
r245790 r245807 87 87 WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON) 88 88 WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) 89 WEBKIT_OPTION_DEFINE(USE_WPE_RENDERER "Whether to enable WPE rendering" PUBLIC ON) 89 90 90 91 # Private options specific to the GTK+ port. Changing these options is … … 104 105 WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_OPENGL) 105 106 WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_X11_TARGET) 107 WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_OPENGL) 108 WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_WAYLAND_TARGET) 106 109 107 110 SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE}) … … 199 202 set(glib_components gio gio-unix gobject gthread gmodule) 200 203 find_package(GLIB 2.36 REQUIRED COMPONENTS ${glib_components}) 204 205 if (USE_WPE_RENDERER) 206 find_package(WPE 1.3.0) 207 if (NOT WPE_FOUND) 208 message(FATAL_ERROR "libwpe is required for USE_WPE_RENDERER") 209 endif () 210 211 find_package(WPEBackend-fdo 1.3.0) 212 if (NOT WPEBACKEND_FDO_FOUND) 213 message(FATAL_ERROR "WPEBackend-fdo is required for USE_WPE_RENDERER") 214 endif () 215 endif () 201 216 202 217 if (ENABLE_XSLT) -
trunk/Source/cmake/OptionsPlayStation.cmake
r245492 r245807 112 112 SET_AND_EXPOSE_TO_BUILD(USE_HARFBUZZ ON) 113 113 SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE ON) 114 SET_AND_EXPOSE_TO_BUILD(USE_WPE_RENDERER ON) 114 115 115 116 SET_AND_EXPOSE_TO_BUILD(USE_INSPECTOR_SOCKET_SERVER ${ENABLE_REMOTE_INSPECTOR}) -
trunk/Source/cmake/OptionsWPE.cmake
r245565 r245807 173 173 SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE TRUE) 174 174 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES TRUE) 175 SET_AND_EXPOSE_TO_BUILD(USE_WPE_RENDERER TRUE) 175 176 SET_AND_EXPOSE_TO_BUILD(USE_XDGMIME TRUE) 176 177 -
trunk/Tools/ChangeLog
r245803 r245807 1 2019-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Use WPEBackend-fdo for accelerating compositing in Wayland instead of the nested compositor 4 https://bugs.webkit.org/show_bug.cgi?id=197944 5 6 Reviewed by Michael Catanzaro. 7 8 Add WPEBackend-fdo to jhbuild moduleset. 9 10 * gtk/jhbuild.modules: 11 1 12 2019-05-27 Wenson Hsieh <wenson_hsieh@apple.com> 2 13 -
trunk/Tools/gtk/jhbuild.modules
r245324 r245807 33 33 <dep package="libgcrypt"/> 34 34 <dep package="openjpeg"/> 35 <dep package="wpebackend-fdo"/> 35 36 <if condition-set="linux"> 36 37 <dep package="xdg-dbus-proxy"/> … … 82 83 <repository type="tarball" name="gnupg.org" 83 84 href="https://www.gnupg.org/ftp/gcrypt/"/> 85 <repository type="tarball" name="wpewebkit" 86 href="https://wpewebkit.org/releases/"/> 84 87 85 88 <cmake id="brotli"> … … 465 468 </cmake> 466 469 470 <cmake id="libwpe"> 471 <branch repo="wpewebkit" module="libwpe-1.3.0.tar.xz" version="1.3.0" 472 hash="sha256:68986647af2433e74f830a06a497ed536dbc8721b04026ed82611a584be71148"/> 473 </cmake> 474 475 <cmake id="wpebackend-fdo"> 476 <dependencies> 477 <dep package="libwpe"/> 478 <dep package="glib"/> 479 </dependencies> 480 <branch repo="wpewebkit" module="wpebackend-fdo-1.3.0.tar.xz" version="1.3.0" 481 hash="sha256:fed9ab29f5d53cf465188da80d014f3aa067c77704f8508c6bd17971fded359d"/> 482 </cmake> 483 467 484 <!-- Dependencies listed below this point are not thought to affect test results, and are only 468 485 included because they themselves depend on other dependencies built by jhbuild. -->
Note:
See TracChangeset
for help on using the changeset viewer.