Changeset 190615 in webkit


Ignore:
Timestamp:
Oct 6, 2015 9:21:04 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Fix ENABLE_OPENGL=OFF builds
https://bugs.webkit.org/show_bug.cgi?id=146511

Patch by Emanuele Aina <Emanuele Aina> on 2015-10-06
Reviewed by Darin Adler.

.:

  • Source/cmake/OptionsGTK.cmake: Make ENABLE_WAYLAND_TARGET depend on

ENABLE_OPENGL due to EGL usage.

Source/WebCore:

  • platform/graphics/texmap/BitmapTextureGL.h:
  • platform/graphics/texmap/BitmapTextureGL.cpp:
  • platform/graphics/texmap/TextureMapperGL.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:
  • platform/graphics/texmap/TextureMapperShaderProgram.h:
  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
ENABLE_OPENGL=OFF only disables the GL-related parts.

Source/WebKit2:

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize):
(webkitWebViewBaseDraw):
(webkitWebViewBaseDidRelaunchWebProcess):
Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
webkitWebViewRenderAcceleratedCompositingResults()

  • UIProcess/DrawingAreaProxyImpl.cpp:
  • UIProcess/DrawingAreaProxyImpl.h:
  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::DrawingArea):

  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/LayerTreeHost.h:

Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
setNativeSurfaceHandleForCompositing().

  • UIProcess/gtk/WebPreferencesGtk.cpp:

(WebKit::WebPreferences::platformInitializeStore):
Default to no AC if no GL support has been built.

  • WebProcess/WebPage/DrawingArea.messages.in:

Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
SetNativeSurfaceHandleForCompositing.

  • WebProcess/WebPage/DrawingAreaImpl.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
setNativeSurfaceHandleForCompositing().
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
Force setAcceleratedCompositingEnabled() only if a LayerTreeHost
implementation is available, to avoid crashing when building without
any GL support.

Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r190451 r190615  
     12015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
     2
     3        Fix ENABLE_OPENGL=OFF builds
     4        https://bugs.webkit.org/show_bug.cgi?id=146511
     5
     6        Reviewed by Darin Adler.
     7
     8        * Source/cmake/OptionsGTK.cmake: Make ENABLE_WAYLAND_TARGET depend on
     9        ENABLE_OPENGL due to EGL usage.
     10
    1112015-10-01  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r190614 r190615  
     12015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
     2
     3        Fix ENABLE_OPENGL=OFF builds
     4        https://bugs.webkit.org/show_bug.cgi?id=146511
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/graphics/texmap/BitmapTextureGL.h:
     9        * platform/graphics/texmap/BitmapTextureGL.cpp:
     10        * platform/graphics/texmap/TextureMapperGL.h:
     11        * platform/graphics/texmap/TextureMapperGL.cpp:
     12        * platform/graphics/texmap/TextureMapperShaderProgram.h:
     13        * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
     14        Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
     15        ENABLE_OPENGL=OFF only disables the GL-related parts.
     16
    1172015-10-06  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp

    r186279 r190615  
    2222#include "config.h"
    2323#include "BitmapTextureGL.h"
     24
     25#if USE(TEXTURE_MAPPER_GL)
    2426
    2527#include "Extensions3D.h"
     
    378380
    379381}; // namespace WebCore
     382
     383#endif // USE(TEXTURE_MAPPER_GL)
  • trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h

    r185518 r190615  
    2121#ifndef BitmapTextureGL_h
    2222#define BitmapTextureGL_h
     23
     24#if USE(TEXTURE_MAPPER_GL)
    2325
    2426#include "BitmapTexture.h"
     
    9395}
    9496
     97#endif // USE(TEXTURE_MAPPER_GL)
     98
    9599#endif // BitmapTextureGL_h
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

    r186279 r190615  
    2222#include "config.h"
    2323#include "TextureMapperGL.h"
     24
     25#if USE(TEXTURE_MAPPER_GL)
    2426
    2527#include "BitmapTextureGL.h"
     
    5254#define GL_UNPACK_SKIP_ROWS 0x0CF3
    5355#endif
    54 
    55 #if USE(TEXTURE_MAPPER)
    5656
    5757namespace WebCore {
     
    799799}
    800800
    801 #if USE(TEXTURE_MAPPER_GL)
    802801std::unique_ptr<TextureMapper> TextureMapper::platformCreateAccelerated()
    803802{
    804803    return std::make_unique<TextureMapperGL>();
    805804}
    806 #endif
    807805
    808806};
    809 #endif
     807
     808#endif // USE(TEXTURE_MAPPER_GL)
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h

    r182101 r190615  
    2222#define TextureMapperGL_h
    2323
    24 #if USE(TEXTURE_MAPPER)
     24#if USE(TEXTURE_MAPPER_GL)
    2525
    2626#include "FilterOperation.h"
     
    139139} // namespace WebCore
    140140
    141 #endif // USE(TEXTURE_MAPPER)
     141#endif // USE(TEXTURE_MAPPER_GL)
    142142
    143143#endif // TextureMapperGL_h
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp

    r189331 r190615  
    2323#include "TextureMapperShaderProgram.h"
    2424
    25 #if USE(TEXTURE_MAPPER)
     25#if USE(TEXTURE_MAPPER_GL)
     26
    2627#include "LengthFunctions.h"
    2728#include "Logging.h"
     
    413414
    414415}
    415 #endif
     416#endif // USE(TEXTURE_MAPPER_GL)
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h

    r173268 r190615  
    2222#define TextureMapperShaderProgram_h
    2323
    24 #if USE(TEXTURE_MAPPER)
     24#if USE(TEXTURE_MAPPER_GL)
    2525#include "GraphicsContext3D.h"
    2626#include "TransformationMatrix.h"
     
    9797
    9898}
    99 #endif
     99#endif // USE(TEXTURE_MAPPER_GL)
    100100
    101101#endif // TextureMapperShaderProgram_h
  • trunk/Source/WebKit2/ChangeLog

    r190612 r190615  
     12015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
     2
     3        Fix ENABLE_OPENGL=OFF builds
     4        https://bugs.webkit.org/show_bug.cgi?id=146511
     5
     6        Reviewed by Darin Adler.
     7
     8        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
     9        (webkitWebViewBaseRealize):
     10        (webkitWebViewBaseDraw):
     11        (webkitWebViewBaseDidRelaunchWebProcess):
     12        Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
     13        webkitWebViewRenderAcceleratedCompositingResults()
     14        * UIProcess/DrawingAreaProxyImpl.cpp:
     15        * UIProcess/DrawingAreaProxyImpl.h:
     16        * WebProcess/WebPage/DrawingArea.cpp:
     17        (WebKit::DrawingArea::DrawingArea):
     18        * WebProcess/WebPage/DrawingArea.h:
     19        * WebProcess/WebPage/LayerTreeHost.h:
     20        Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
     21        setNativeSurfaceHandleForCompositing().
     22        * UIProcess/gtk/WebPreferencesGtk.cpp:
     23        (WebKit::WebPreferences::platformInitializeStore):
     24        Default to no AC if no GL support has been built.
     25        * WebProcess/WebPage/DrawingArea.messages.in:
     26        Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
     27        SetNativeSurfaceHandleForCompositing.
     28        * WebProcess/WebPage/DrawingAreaImpl.h:
     29        * WebProcess/WebPage/DrawingAreaImpl.cpp:
     30        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
     31        Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
     32        setNativeSurfaceHandleForCompositing().
     33        (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
     34        Force setAcceleratedCompositingEnabled() only if a LayerTreeHost
     35        implementation is available, to avoid crashing when building without
     36        any GL support.
     37
    1382015-10-06  Csaba Osztrogonác  <ossy@webkit.org>
    239
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp

    r190344 r190615  
    327327    gdk_window_set_user_data(window, widget);
    328328
    329 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     329#if USE(TEXTURE_MAPPER) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
    330330    DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(priv->pageProxy->drawingArea());
    331331    drawingArea->setNativeSurfaceHandleForCompositing(GDK_WINDOW_XID(window));
     
    473473}
    474474
    475 #if USE(TEXTURE_MAPPER_GL)
     475#if USE(TEXTURE_MAPPER)
    476476static bool webkitWebViewRenderAcceleratedCompositingResults(WebKitWebViewBase* webViewBase, DrawingAreaProxyImpl* drawingArea, cairo_t* cr, GdkRectangle* clipRect)
    477477{
     
    519519        return FALSE;
    520520
    521 #if USE(TEXTURE_MAPPER_GL)
     521#if USE(TEXTURE_MAPPER)
    522522    if (webkitWebViewRenderAcceleratedCompositingResults(webViewBase, drawingArea, cr, &clipRect))
    523523        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->draw(widget, cr);
     
    13701370    gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webkitWebViewBase));
    13711371
    1372 #if PLATFORM(X11)
     1372#if PLATFORM(X11) && USE(TEXTURE_MAPPER)
    13731373    if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
    13741374        return;
     
    13801380    if (!priv->redirectedWindow)
    13811381        return;
    1382     drawingArea->setNativeSurfaceHandleForCompositing(priv->redirectedWindow->windowID());
     1382    uint64_t windowID = priv->redirectedWindow->windowID();
    13831383#else
    13841384    if (!gtk_widget_get_realized(GTK_WIDGET(webkitWebViewBase)))
    13851385        return;
    1386     drawingArea->setNativeSurfaceHandleForCompositing(GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(webkitWebViewBase))));
    1387 #endif
     1386    uint64_t windowID = GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(webkitWebViewBase)));
     1387#endif
     1388    drawingArea->setNativeSurfaceHandleForCompositing(windowID);
    13881389#else
    13891390    UNUSED_PARAM(webkitWebViewBase);
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp

    r176954 r190615  
    301301}
    302302
    303 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     303#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    304304void DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing(uint64_t handle)
    305305{
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h

    r181324 r190615  
    4949    bool hasReceivedFirstUpdate() const { return m_hasReceivedFirstUpdate; }
    5050
    51 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     51#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    5252    void setNativeSurfaceHandleForCompositing(uint64_t);
    5353#endif
  • trunk/Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp

    r187641 r190615  
    4343        setPluginsEnabled(false);
    4444    }
     45#endif
     46#if !ENABLE(OPEN_GL)
     47    setAcceleratedCompositingEnabled(false);
    4548#endif
    4649}
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp

    r183746 r190615  
    7777    : m_type(type)
    7878    , m_webPage(webPage)
    79 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     79#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    8080    , m_nativeSurfaceHandleForCompositing(0)
    8181#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h

    r190064 r190615  
    144144    WebPage& m_webPage;
    145145
    146 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     146#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    147147    uint64_t m_nativeSurfaceHandleForCompositing;
    148148#endif
     
    169169#endif
    170170
    171 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     171#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    172172    virtual void setNativeSurfaceHandleForCompositing(uint64_t) = 0;
    173173#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in

    r186662 r190615  
    4141#endif
    4242
    43 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     43#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    4444    SetNativeSurfaceHandleForCompositing(uint64_t handle)
    4545#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

    r190238 r190615  
    469469
    470470    m_layerTreeHost = LayerTreeHost::create(&m_webPage);
    471 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     471#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    472472    if (m_nativeSurfaceHandleForCompositing)
    473473        m_layerTreeHost->setNativeSurfaceHandleForCompositing(m_nativeSurfaceHandleForCompositing);
     
    688688}
    689689
    690 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     690#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    691691void DrawingAreaImpl::setNativeSurfaceHandleForCompositing(uint64_t handle)
    692692{
    693693    m_nativeSurfaceHandleForCompositing = handle;
    694     m_webPage.corePage()->settings().setAcceleratedCompositingEnabled(true);
    695 
    696     if (m_layerTreeHost)
     694
     695    if (m_layerTreeHost) {
     696        m_webPage.corePage()->settings().setAcceleratedCompositingEnabled(true);
    697697        m_layerTreeHost->setNativeSurfaceHandleForCompositing(handle);
     698    }
    698699}
    699700#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h

    r190238 r190615  
    7171    virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
    7272
    73 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     73#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    7474    virtual void setNativeSurfaceHandleForCompositing(uint64_t) override;
    7575#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h

    r188212 r190615  
    9393#endif
    9494
    95 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
     95#if USE(TEXTURE_MAPPER) && PLATFORM(GTK)
    9696    virtual void setNativeSurfaceHandleForCompositing(uint64_t) = 0;
    9797#endif
  • trunk/Source/cmake/OptionsGTK.cmake

    r190025 r190615  
    9696WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_VIDEO)
    9797WEBKIT_OPTION_DEPEND(USE_GSTREAMER_MPEGTS ENABLE_VIDEO)
     98WEBKIT_OPTION_DEPEND(ENABLE_WAYLAND_TARGET ENABLE_OPENGL)
    9899
    99100SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
Note: See TracChangeset for help on using the changeset viewer.