Changeset 185198 in webkit


Ignore:
Timestamp:
Jun 4, 2015 3:55:31 AM (9 years ago)
Author:
clopez@igalia.com
Message:

[GTK] [Wayland] Build is broken on trunk
https://bugs.webkit.org/show_bug.cgi?id=142879

Reviewed by Carlos Garcia Campos.

Source/WebCore:

No new tests, no behavior changes.

Patch on GLContext.h picked from bug 136831 by
Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>

  • platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h

to use the Wayland platform when building for Wayland.

  • platform/graphics/PlatformDisplay.cpp: Fix the include of GDK

headers for the different targets.

  • platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.

(WebCore::WaylandSurface::~WaylandSurface):

Source/WebKit2:

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
is enabled GLNativeWindowType is not an u_int64 type.
Cast contextID to avoid a build failure.

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r185197 r185198  
     12015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [GTK] [Wayland] Build is broken on trunk
     4        https://bugs.webkit.org/show_bug.cgi?id=142879
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        No new tests, no behavior changes.
     9
     10        Patch on GLContext.h picked from bug 136831 by
     11        Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
     12
     13        * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
     14        to use the Wayland platform when building for Wayland.
     15        * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
     16        headers for the different targets.
     17        * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
     18        (WebCore::WaylandSurface::~WaylandSurface):
     19
    1202015-06-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
    221
  • trunk/Source/WebCore/platform/graphics/GLContext.h

    r183432 r185198  
    2727#if USE(EGL) && !PLATFORM(GTK)
    2828#include "eglplatform.h"
     29typedef EGLNativeWindowType GLNativeWindowType;
     30#elif PLATFORM(GTK) && PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2)
     31#include <wayland-egl.h>
     32#include <EGL/eglplatform.h>
    2933typedef EGLNativeWindowType GLNativeWindowType;
    3034#else
  • trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp

    r183892 r185198  
    4343
    4444#if PLATFORM(GTK)
     45#if PLATFORM(X11)
    4546#include <gdk/gdkx.h>
    4647#endif
     48#if PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2)
     49#include <gdk/gdkwayland.h>
     50#endif
     51#endif // PLATFORM(GTK)
    4752
    4853#if PLATFORM(EFL) && defined(HAVE_ECORE_X)
  • trunk/Source/WebCore/platform/graphics/wayland/WaylandSurface.cpp

    r177786 r185198  
    3131#include "GLContextEGL.h"
    3232#include "IntSize.h"
    33 #include "WaylandDisplay.h"
     33#include "PlatformDisplayWayland.h"
    3434#include <EGL/egl.h>
    3535
     
    5555{
    5656    // The surface couldn't have been created in the first place if WaylandDisplay wasn't properly initialized.
    57     ASSERT(WaylandDisplay::instance());
    58     eglMakeCurrent(WaylandDisplay::instance()->eglDisplay(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
     57    const PlatformDisplayWayland& waylandDisplay = downcast<PlatformDisplayWayland>(PlatformDisplay::sharedDisplay());
     58    ASSERT(waylandDisplay.native());
     59    eglMakeCurrent(waylandDisplay.native(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
    5960
    6061    wl_egl_window_destroy(m_nativeWindow);
  • trunk/Source/WebKit2/ChangeLog

    r185190 r185198  
     12015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [GTK] [Wayland] Build is broken on trunk
     4        https://bugs.webkit.org/show_bug.cgi?id=142879
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
     9        (WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
     10        is enabled GLNativeWindowType is not an u_int64 type.
     11        Cast contextID to avoid a build failure.
     12
    1132015-06-03  Dan Bernstein  <mitz@apple.com>
    214
  • trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp

    r183807 r185198  
    8585            return false;
    8686
    87         m_context = GLContext::createContextForWindow(m_layerTreeContext.contextID, GLContext::sharingContext());
     87        m_context = GLContext::createContextForWindow(reinterpret_cast<GLNativeWindowType>(m_layerTreeContext.contextID), GLContext::sharingContext());
    8888        if (!m_context)
    8989            return false;
Note: See TracChangeset for help on using the changeset viewer.