Changeset 207658 in webkit


Ignore:
Timestamp:
Oct 20, 2016 10:30:53 PM (7 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Configures but fails to link with ENABLE_OPENGL=OFF
https://bugs.webkit.org/show_bug.cgi?id=163449

Reviewed by Michael Catanzaro.

.:

Remove wrong dependency of Wayland on OpenGL introduced in r190615, it should be possible to build for Wayland
without GL.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Only define sharingGLContext in PlatformDisplay if EGL or GLX are enabled.

  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::initialize):

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::~PlatformDisplayX11):

Source/WebKit2:

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER and also ensure the current
display is X11.
(webkitWebViewBaseUnrealize): Ditto.
(webkitWebViewBaseDidRelaunchWebProcess): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
(webkitWebViewBasePageClosed): Ditto.

  • UIProcess/AcceleratedDrawingAreaProxy.cpp:

(WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): Ditto.
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Check EGL is enabled before
trying to use the WaylandCompositor.

  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess): Ditto.

  • UIProcess/gtk/AcceleratedBackingStore.cpp:

(WebKit::AcceleratedBackingStore::create): Ditto.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
  • UIProcess/gtk/WaylandCompositor.cpp:
  • UIProcess/gtk/WaylandCompositor.h:
  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/DrawingArea.messages.in:
  • WebProcess/WebPage/LayerTreeHost.h:
Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r207617 r207658  
     12016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
     4        https://bugs.webkit.org/show_bug.cgi?id=163449
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Remove wrong dependency of Wayland on OpenGL introduced in r190615, it should be possible to build for Wayland
     9        without GL.
     10
     11        * Source/cmake/OptionsGTK.cmake:
     12
    1132016-10-20  Fujii Hironori  <Hironori.Fujii@sony.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r207653 r207658  
     12016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
     4        https://bugs.webkit.org/show_bug.cgi?id=163449
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Only define sharingGLContext in PlatformDisplay if EGL or GLX are enabled.
     9
     10        * platform/graphics/PlatformDisplay.cpp:
     11        * platform/graphics/PlatformDisplay.h:
     12        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
     13        (WebCore::PlatformDisplayWayland::initialize):
     14        * platform/graphics/x11/PlatformDisplayX11.cpp:
     15        (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
     16
    1172016-10-20  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp

    r205116 r207658  
    133133}
    134134
    135 #if !PLATFORM(EFL)
     135#if !PLATFORM(EFL) && (USE(EGL) || USE(GLX))
    136136GLContext* PlatformDisplay::sharingGLContext()
    137137{
  • trunk/Source/WebCore/platform/graphics/PlatformDisplay.h

    r205852 r207658  
    5959    virtual Type type() const = 0;
    6060
    61 #if !PLATFORM(EFL)
     61#if !PLATFORM(EFL) && (USE(EGL) || USE(GLX))
    6262    // FIXME: This should not have any platform ifdef, but EFL has its own EGLContext class
    6363    // instead of using the GLContext common API.
     
    8181#endif
    8282
     83#if USE(EGL) || USE(GLX)
    8384    std::unique_ptr<GLContext> m_sharingGLContext;
     85#endif
    8486
    8587private:
  • trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp

    r207619 r207658  
    6767    wl_display_roundtrip(m_display);
    6868
     69#if USE(EGL)
    6970#if defined(EGL_KHR_platform_wayland)
    7071    const char* extensions = eglQueryString(nullptr, EGL_EXTENSIONS);
     
    8081
    8182    PlatformDisplay::initializeEGLDisplay();
     83#endif
    8284}
    8385
  • trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp

    r207619 r207658  
    5757PlatformDisplayX11::~PlatformDisplayX11()
    5858{
     59#if USE(EGL) || USE(GLX)
    5960    // Clear the sharing context before releasing the display.
    6061    m_sharingGLContext = nullptr;
     62#endif
    6163    if (m_ownedDisplay)
    6264        XCloseDisplay(m_display);
  • trunk/Source/WebKit2/ChangeLog

    r207648 r207658  
     12016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
     4        https://bugs.webkit.org/show_bug.cgi?id=163449
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
     9        (webkitWebViewBaseRealize): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER and also ensure the current
     10        display is X11.
     11        (webkitWebViewBaseUnrealize): Ditto.
     12        (webkitWebViewBaseDidRelaunchWebProcess): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
     13        (webkitWebViewBasePageClosed): Ditto.
     14        * UIProcess/AcceleratedDrawingAreaProxy.cpp:
     15        (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): Ditto.
     16        (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Check EGL is enabled before
     17        trying to use the WaylandCompositor.
     18        * UIProcess/AcceleratedDrawingAreaProxy.h:
     19        * UIProcess/WebProcessPool.cpp:
     20        (WebKit::WebProcessPool::createNewWebProcess): Ditto.
     21        * UIProcess/gtk/AcceleratedBackingStore.cpp:
     22        (WebKit::AcceleratedBackingStore::create): Ditto.
     23        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
     24        * UIProcess/gtk/WaylandCompositor.cpp:
     25        * UIProcess/gtk/WaylandCompositor.h:
     26        * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
     27        (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
     28        * WebProcess/WebPage/AcceleratedDrawingArea.h:
     29        * WebProcess/WebPage/DrawingArea.h:
     30        * WebProcess/WebPage/DrawingArea.messages.in:
     31        * WebProcess/WebPage/LayerTreeHost.h:
     32
    1332016-10-20  Chris Dumez  <cdumez@apple.com>
    234
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp

    r206985 r207658  
    378378    gdk_window_set_user_data(window, widget);
    379379
    380 #if USE(TEXTURE_MAPPER) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    381     if (DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(priv->pageProxy->drawingArea()))
    382         drawingArea->setNativeSurfaceHandleForCompositing(GDK_WINDOW_XID(window));
     380#if USE(TEXTURE_MAPPER_GL) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     381    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
     382        if (DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(priv->pageProxy->drawingArea()))
     383            drawingArea->setNativeSurfaceHandleForCompositing(GDK_WINDOW_XID(window));
     384    }
    383385#endif
    384386
     
    391393{
    392394    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(widget);
    393 #if USE(TEXTURE_MAPPER) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    394     if (DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea()))
    395         drawingArea->destroyNativeSurfaceHandleForCompositing();
     395#if USE(TEXTURE_MAPPER_GL) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     396    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
     397        if (DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea()))
     398            drawingArea->destroyNativeSurfaceHandleForCompositing();
     399    }
    396400#endif
    397401    gtk_im_context_set_client_window(webView->priv->inputMethodFilter.context(), nullptr);
     
    14771481    gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webkitWebViewBase));
    14781482
    1479 #if PLATFORM(X11) && USE(TEXTURE_MAPPER) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     1483#if PLATFORM(X11) && USE(TEXTURE_MAPPER_GL) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    14801484    if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
    14811485        return;
     
    14991503    if (webkitWebViewBase->priv->acceleratedBackingStore)
    15001504        webkitWebViewBase->priv->acceleratedBackingStore->update(LayerTreeContext());
    1501 #if PLATFORM(X11) && USE(TEXTURE_MAPPER) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     1505#if PLATFORM(X11) && USE(TEXTURE_MAPPER_GL) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    15021506    if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
    15031507        return;
  • trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.cpp

    r206806 r207658  
    140140        m_hasReceivedFirstUpdate = true;
    141141
    142 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     142#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    143143        if (m_pendingNativeSurfaceHandleForCompositing) {
    144144            setNativeSurfaceHandleForCompositing(m_pendingNativeSurfaceHandleForCompositing);
     
    224224        return;
    225225
    226 #if PLATFORM(WAYLAND)
     226#if PLATFORM(WAYLAND) && USE(EGL)
    227227    // Never block the UI process in Wayland when waiting for DidUpdateBackingStoreState after a resize,
    228228    // because the nested compositor needs to handle the web process requests that happens while resizing.
     
    264264}
    265265
    266 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     266#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    267267void AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing(uint64_t handle)
    268268{
  • trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.h

    r205431 r207658  
    4747#endif
    4848
    49 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     49#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    5050    void setNativeSurfaceHandleForCompositing(uint64_t);
    5151    void destroyNativeSurfaceHandleForCompositing();
     
    100100    bool m_hasReceivedFirstUpdate { false };
    101101
    102 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     102#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    103103    uint64_t m_pendingNativeSurfaceHandleForCompositing { 0 };
    104104#endif
  • trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp

    r207648 r207658  
    648648#endif
    649649
    650 #if PLATFORM(WAYLAND)
     650#if PLATFORM(WAYLAND) && USE(EGL)
    651651    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
    652652        parameters.waylandCompositorDisplayName = WaylandCompositor::singleton().displayName();
  • trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStore.cpp

    r205116 r207658  
    4545std::unique_ptr<AcceleratedBackingStore> AcceleratedBackingStore::create(WebPageProxy& webPage)
    4646{
    47 #if PLATFORM(WAYLAND)
     47#if PLATFORM(WAYLAND) && USE(EGL)
    4848    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
    4949        return AcceleratedBackingStoreWayland::create(webPage);
  • trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp

    r206424 r207658  
    2727#include "AcceleratedBackingStoreWayland.h"
    2828
    29 #if PLATFORM(WAYLAND)
     29#if PLATFORM(WAYLAND) && USE(EGL)
    3030
    3131#include "WaylandCompositor.h"
     
    163163} // namespace WebKit
    164164
    165 #endif // PLATFORM(WAYLAND)
     165#endif // PLATFORM(WAYLAND) && USE(EGL)
  • trunk/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp

    r207614 r207658  
    2727#include "WaylandCompositor.h"
    2828
    29 #if PLATFORM(WAYLAND)
     29#if PLATFORM(WAYLAND) && USE(EGL)
    3030
    3131#include "WebKit2WaylandServerProtocol.h"
     
    517517} // namespace WebKit
    518518
    519 #endif // PLATFORM(WAYLAND)
     519#endif // PLATFORM(WAYLAND) && USE(EGL)
  • trunk/Source/WebKit2/UIProcess/gtk/WaylandCompositor.h

    r206961 r207658  
    2626#pragma once
    2727
    28 #if PLATFORM(WAYLAND)
     28#if PLATFORM(WAYLAND) && USE(EGL)
    2929
    3030#include "WebPageProxy.h"
     
    127127} // namespace WebKit
    128128
    129 #endif // PLATFORM(WAYLAND)
     129#endif // PLATFORM(WAYLAND) && USE(EGL)
  • trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp

    r205431 r207658  
    321321    ASSERT(!m_layerTreeHost);
    322322    m_layerTreeHost = LayerTreeHost::create(m_webPage);
    323 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     323#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    324324    if (m_nativeSurfaceHandleForCompositing)
    325325        m_layerTreeHost->setNativeSurfaceHandleForCompositing(m_nativeSurfaceHandleForCompositing);
     
    353353#endif
    354354
    355 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     355#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    356356void AcceleratedDrawingArea::setNativeSurfaceHandleForCompositing(uint64_t handle)
    357357{
  • trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.h

    r205431 r207658  
    6464#endif
    6565
    66 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     66#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    6767    void setNativeSurfaceHandleForCompositing(uint64_t) override;
    6868    void destroyNativeSurfaceHandleForCompositing(bool&) override;
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h

    r205431 r207658  
    147147    WebPage& m_webPage;
    148148
    149 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     149#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    150150    uint64_t m_nativeSurfaceHandleForCompositing { 0 };
    151151#endif
     
    173173#endif
    174174
    175 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     175#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    176176    virtual void setNativeSurfaceHandleForCompositing(uint64_t) = 0;
    177177    virtual void destroyNativeSurfaceHandleForCompositing(bool&) = 0;
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in

    r205431 r207658  
    4141#endif
    4242
    43 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     43#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    4444    SetNativeSurfaceHandleForCompositing(uint64_t handle)
    4545    DestroyNativeSurfaceHandleForCompositing() -> (bool handled)
  • trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h

    r205369 r207658  
    9393#endif
    9494
    95 #if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
     95#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
    9696    virtual void setNativeSurfaceHandleForCompositing(uint64_t) { };
    9797#endif
  • trunk/Source/cmake/OptionsGTK.cmake

    r206731 r207658  
    111111WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_VIDEO)
    112112WEBKIT_OPTION_DEPEND(USE_GSTREAMER_MPEGTS ENABLE_VIDEO)
    113 WEBKIT_OPTION_DEPEND(ENABLE_WAYLAND_TARGET ENABLE_OPENGL)
    114113
    115114SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
Note: See TracChangeset for help on using the changeset viewer.