[WPE] libepoxy headers can use EGL_CAST, which might not be defined by eglplatform.h
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jul 2017 14:24:38 +0000 (14:24 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jul 2017 14:24:38 +0000 (14:24 +0000)
commite1121e608a81f922eead05f94c53b55f44dac93c
tree01ce0a4ec672120d7f9dca719d2e14cfdfd270c6
parente5852c3ad86de28161bf27325eee7ce87b7a7a8c
[WPE] libepoxy headers can use EGL_CAST, which might not be defined by eglplatform.h
https://bugs.webkit.org/show_bug.cgi?id=174780

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Newer versions of libepoxy provide EGL definitions that already use the EGL_CAST macro.
We'd like to compile on systems where the eglplatform.h header doesn't yet provide
that macro that was added only recently (e.g. it's available in Mesa 17.1, but not
before).

To address that, the EpoxyEGL.h header is added that first includes the libepoxy's EGL
header and then provides the EGL_CAST definition in case the eglplatform.h header doesn't.
This header should be included in place of <epoxy/egl.h> (which is included in this new
header).

The EpoxyEGL.h and EpoxyShims.h headers are also moved under the platform/graphics/epoxy/
directory, with the new directory added to the list of inclusion paths for WPE.

* PlatformWPE.cmake:
* platform/graphics/PlatformDisplay.cpp:
* platform/graphics/cairo/CairoUtilities.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGLWPE.cpp:
* platform/graphics/epoxy/EpoxyEGL.h: Added.
* platform/graphics/epoxy/EpoxyShims.h: Renamed from Source/WebCore/platform/graphics/EpoxyShims.h.
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
* platform/graphics/wpe/PlatformDisplayWPE.cpp:

Tools:

* WebKitTestRunner/wpe/HeadlessViewBackend.cpp:
Manually define the EGL_CAST macro to the C++ version that uses static_cast<>
in case the eglplatform.h header doesn't provide that macro. This replicates
the work in WebCore's EpoxyEGL.h header, but we can't include that header here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PlatformWPE.cmake
Source/WebCore/platform/graphics/PlatformDisplay.cpp
Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp
Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h [new file with mode: 0644]
Source/WebCore/platform/graphics/epoxy/EpoxyShims.h [moved from Source/WebCore/platform/graphics/EpoxyShims.h with 100% similarity]
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp
Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/wpe/HeadlessViewBackend.cpp