WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP patch
bug-172104-20170705212032.patch (text/plain), 28.74 KB, created by
Zan Dobersek
on 2017-07-05 12:20:33 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2017-07-05 12:20:33 PDT
Size:
28.74 KB
patch
obsolete
>Subversion Revision: 219126 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a82c4e2cb343c0de188ef110b4a1f208271ef980..f0350b72241cbb46c4ed2e7fdb065007589d0b33 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,39 @@ >+2017-07-05 Zan Dobersek <zdobersek@igalia.com> >+ >+ [WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * CMakeLists.txt: >+ * PlatformWPE.cmake: >+ * platform/graphics/ANGLEWebKitBridge.h: >+ * platform/graphics/EpoxyShims.h: Added. >+ * platform/graphics/GLContext.cpp: >+ (WebCore::initializeOpenGLShimsIfNeeded): >+ * platform/graphics/GraphicsContext3DPrivate.cpp: >+ * platform/graphics/PlatformDisplay.cpp: >+ * platform/graphics/cairo/CairoUtilities.cpp: >+ * platform/graphics/cairo/GraphicsContext3DCairo.cpp: >+ (WebCore::GraphicsContext3D::create): >+ * platform/graphics/cairo/ImageBufferCairo.cpp: >+ * platform/graphics/egl/GLContextEGL.cpp: >+ * platform/graphics/egl/GLContextEGLWPE.cpp: >+ * platform/graphics/egl/GLContextEGLWayland.cpp: >+ * platform/graphics/egl/GLContextEGLX11.cpp: >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: >+ * platform/graphics/opengl/Extensions3DOpenGL.cpp: >+ * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: >+ * platform/graphics/opengl/Extensions3DOpenGLES.cpp: >+ * platform/graphics/opengl/Extensions3DOpenGLES.h: >+ * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: >+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: >+ * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: >+ * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: >+ * platform/graphics/wpe/PlatformDisplayWPE.cpp: >+ > 2017-07-04 Said Abou-Hallawa <sabouhallawa@apple.com> > > Unreviewed, review follow-up after r218961 >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index db0017948f31a56dbd3241a73ec8de8e707a2127..4eb8827a3a9ae17dbec53b5be92a0bb2cb970e95 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,5 +1,15 @@ > 2017-07-05 Zan Dobersek <zdobersek@igalia.com> > >+ [WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PlatformWPE.cmake: >+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: >+ >+2017-07-05 Zan Dobersek <zdobersek@igalia.com> >+ > [GLib] Incorrect <glib/gi18n.h> include in WebKitWebsiteData > https://bugs.webkit.org/show_bug.cgi?id=174093 > >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index ce7b168efb4736c60ec1a7690910f4e9e0cd4e0c..dcd5720c486478aacb74e7439de1871f0575c1b3 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -3329,7 +3329,7 @@ if (ENABLE_GRAPHICS_CONTEXT_3D) > # For platforms that want to use system-provided OpenGL (ES) / EGL headers, > # these include directories, libraries or definitions need to be > # added before the ANGLE directories. >- if (USE_OPENGL) >+ if (USE_OPENGL AND NOT USE_LIBEPOXY) > list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES > ${OPENGL_INCLUDE_DIRS} > ) >@@ -3337,7 +3337,7 @@ if (ENABLE_GRAPHICS_CONTEXT_3D) > ${OPENGL_LIBRARIES} > ) > add_definitions(${OPENGL_DEFINITIONS}) >- elseif (USE_OPENGL_ES_2) >+ elseif (USE_OPENGL_ES_2 AND NOT USE_LIBEPOXY) > list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES > ${OPENGLES2_INCLUDE_DIRS} > ) >@@ -3347,7 +3347,7 @@ if (ENABLE_GRAPHICS_CONTEXT_3D) > add_definitions(${OPENGLES2_DEFINITIONS}) > endif () > >- if (USE_EGL) >+ if (USE_EGL AND NOT USE_LIBEPOXY) > list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES > ${EGL_INCLUDE_DIRS} > ) >@@ -3357,6 +3357,15 @@ if (ENABLE_GRAPHICS_CONTEXT_3D) > add_definitions(${EGL_DEFINITIONS}) > endif () > >+ if (USE_LIBEPOXY) >+ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES >+ ${LIBEPOXY_INCLUDE_DIRS} >+ ) >+ list(APPEND WebCore_LIBRARIES >+ ${LIBEPOXY_LIBRARIES} >+ ) >+ endif () >+ > list(APPEND WebCore_INCLUDE_DIRECTORIES > "${ANGLE_FORWARDING_HEADERS_DIR}" > "${WEBCORE_DIR}/platform/graphics/gpu" >diff --git a/Source/WebCore/PlatformWPE.cmake b/Source/WebCore/PlatformWPE.cmake >index 4f6bbb12854f9606ad7f3cfe9bd91f64d687ed82..141cbe202aa2e5f5aeb8cec7255c66c6b617829c 100644 >--- a/Source/WebCore/PlatformWPE.cmake >+++ b/Source/WebCore/PlatformWPE.cmake >@@ -162,7 +162,6 @@ set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/wpe/RenderTh > > list(APPEND WebCore_LIBRARIES > ${CAIRO_LIBRARIES} >- ${EGL_LIBRARIES} > ${GLIB_GIO_LIBRARIES} > ${GLIB_GMODULE_LIBRARIES} > ${GLIB_GOBJECT_LIBRARIES} >@@ -180,7 +179,6 @@ list(APPEND WebCore_LIBRARIES > > list(APPEND WebCore_INCLUDE_DIRECTORIES > ${CAIRO_INCLUDE_DIRS} >- ${EGL_INCLUDE_DIRS} > ${GLIB_INCLUDE_DIRS} > ${GNUTLS_INCLUDE_DIRS} > ${ICU_INCLUDE_DIRS} >diff --git a/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h b/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h >index 02fe3b019076d1bbee67ada471bb37732370534c..7e1bb3d1353cd3617d4955f5a07c7ba99c39f16c 100644 >--- a/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h >+++ b/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h >@@ -26,6 +26,10 @@ > #ifndef ANGLEWebKitBridge_h > #define ANGLEWebKitBridge_h > >+#if USE(LIBEPOXY) >+#include "EpoxyShims.h" >+#endif >+ > #include <ANGLE/ShaderLang.h> > #include <wtf/text/WTFString.h> > >@@ -36,7 +40,9 @@ > #elif PLATFORM(WIN) > #include "OpenGLESShims.h" > #elif PLATFORM(GTK) || PLATFORM(WPE) >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include "EpoxyShims.h" >+#elif USE(OPENGL_ES_2) > #include <GLES2/gl2.h> > #else > #include "OpenGLShims.h" >diff --git a/Source/WebCore/platform/graphics/EpoxyShims.h b/Source/WebCore/platform/graphics/EpoxyShims.h >new file mode 100644 >index 0000000000000000000000000000000000000000..50ca11b73cd7902ea1ea9134a2f8f9737499b1cf >--- /dev/null >+++ b/Source/WebCore/platform/graphics/EpoxyShims.h >@@ -0,0 +1,73 @@ >+/* >+ * Copyright (C) 2017 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <epoxy/gl.h> >+ >+#undef glBindFramebufferEXT >+#define glBindFramebufferEXT glBindFramebuffer >+ >+#undef glFramebufferTexture2DEXT >+#define glFramebufferTexture2DEXT glFramebufferTexture2D >+ >+#undef glBindRenderbufferEXT >+#define glBindRenderbufferEXT glBindRenderbuffer >+ >+#undef glRenderbufferStorageEXT >+#define glRenderbufferStorageEXT glRenderbufferStorage >+ >+#undef glFramebufferRenderbufferEXT >+#define glFramebufferRenderbufferEXT glFramebufferRenderbuffer >+ >+#undef glCheckFramebufferStatusEXT >+#define glCheckFramebufferStatusEXT glCheckFramebufferStatus >+ >+#undef glDeleteFramebuffersEXT >+#define glDeleteFramebuffersEXT glDeleteFramebuffers >+ >+#undef glDeleteRenderbuffersEXT >+#define glDeleteRenderbuffersEXT glDeleteRenderbuffers >+ >+#undef glGenRenderbuffersEXT >+#define glGenRenderbuffersEXT glGenRenderbuffers >+ >+#undef glGenFramebuffersEXT >+#define glGenFramebuffersEXT glGenFramebuffers >+ >+#undef glGetFramebufferAttachmentParameterivEXT >+#define glGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv >+ >+#undef glGetRenderbufferParameterivEXT >+#define glGetRenderbufferParameterivEXT glGetRenderbufferParameteriv >+ >+#undef glIsRenderbufferEXT >+#define glIsRenderbufferEXT glIsRenderbuffer >+ >+#undef glIsFramebufferEXT >+#define glIsFramebufferEXT glIsFramebuffer >+ >+#undef glGenerateMipmapEXT >+#define glGenerateMipmapEXT glGenerateMipmap >diff --git a/Source/WebCore/platform/graphics/GLContext.cpp b/Source/WebCore/platform/graphics/GLContext.cpp >index c15bec5e9b2fd19cc3f8b4b8b04f82632d4392c2..33c97231017a3f058c58fd6059b47d2beda94003 100644 >--- a/Source/WebCore/platform/graphics/GLContext.cpp >+++ b/Source/WebCore/platform/graphics/GLContext.cpp >@@ -26,7 +26,9 @@ > #include "GLContextEGL.h" > #endif > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL_ES_2) > #define GL_GLEXT_PROTOTYPES 1 > #include <GLES2/gl2.h> > #include <GLES3/gl3.h> >@@ -62,7 +64,7 @@ inline ThreadGlobalGLContext* currentContext() > > static bool initializeOpenGLShimsIfNeeded() > { >-#if USE(OPENGL_ES_2) >+#if USE(OPENGL_ES_2) || USE(LIBEPOXY) > return true; > #else > static bool initialized = false; >diff --git a/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp b/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp >index fc764654fc4a5334681fae418c73db03e49703ac..79bf86c6fac3d9940c62c32994b47125e4019cd8 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp >@@ -26,7 +26,9 @@ > #include <wtf/StdLibExtras.h> > > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL_ES_2) > #include <GLES2/gl2.h> > #include <GLES2/gl2ext.h> > #else >diff --git a/Source/WebCore/platform/graphics/PlatformDisplay.cpp b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >index 1b71954f553efbb131bd89512795ffcb8d8d7ae3..e571b7c06852c1ef8718a9abbc10dd109bf5b161 100644 >--- a/Source/WebCore/platform/graphics/PlatformDisplay.cpp >+++ b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >@@ -59,7 +59,11 @@ > #endif > > #if USE(EGL) >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> >+#endif > #include <wtf/HashSet.h> > #include <wtf/NeverDestroyed.h> > #endif >diff --git a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp >index 86c561c5b33cb7b8b495394e17cfee8a6de53404..4022fdcb2c44b2fcbf59f777ea12a189db93b104 100644 >--- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp >+++ b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp >@@ -43,6 +43,9 @@ > #include <wtf/Vector.h> > > #if ENABLE(ACCELERATED_2D_CANVAS) >+#if USE(EGL) && USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#endif > #include <cairo-gl.h> > #endif > >diff --git a/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp b/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp >index ce48a68f0970eef3e5d92c5da5efd76cb1ca6210..c6d63fabdfcea34be95c2ae6d20916ee1fb707c4 100644 >--- a/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp >@@ -47,11 +47,16 @@ > #include <ANGLE/ShaderLang.h> > #endif > >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL) >+#include "OpenGLShims.h" >+#endif >+ > #if USE(OPENGL_ES_2) > #include "Extensions3DOpenGLES.h" > #else > #include "Extensions3DOpenGL.h" >-#include "OpenGLShims.h" > #endif > > #if USE(TEXTURE_MAPPER) >@@ -69,7 +74,7 @@ RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3DAttributes > static bool initialized = false; > static bool success = true; > if (!initialized) { >-#if !USE(OPENGL_ES_2) >+#if USE(OPENGL) && !USE(LIBEPOXY) > success = initializeOpenGLShims(); > #endif > initialized = true; >diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >index 69a53aafae437d11b339af1438e70f0a3a51f7f2..1a51cf54e7336f873437a31c380d226007a2d062 100644 >--- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >@@ -50,6 +50,10 @@ > #if ENABLE(ACCELERATED_2D_CANVAS) > #include "GLContext.h" > #include "TextureMapperGL.h" >+ >+#if USE(EGL) && USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#endif > #include <cairo-gl.h> > > #if USE(OPENGL_ES_2) >diff --git a/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp b/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp >index 055e30b1615f518bc8ecb3e99293f75fab09fcd1..c9f8c4d1db4569655d0c19fed53ef11a4d8df1c8 100644 >--- a/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp >+++ b/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp >@@ -23,13 +23,20 @@ > > #include "GraphicsContext3D.h" > #include "PlatformDisplay.h" >+ >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> >+#endif > > #if USE(CAIRO) > #include <cairo.h> > #endif > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL_ES2) > #define GL_GLEXT_PROTOTYPES 1 > #include <GLES2/gl2.h> > #include <GLES2/gl2ext.h> >diff --git a/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp b/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp >index 2980d28b0cf85d1714859fdd9b121aeea0e2164d..b4a6725801f62cf0dba8c6a7c20dab3b798b7323 100644 >--- a/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp >+++ b/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp >@@ -25,7 +25,11 @@ > // FIXME: For now default to the GBM EGL platform, but this should really be > // somehow deducible from the build configuration. > #define __GBM__ 1 >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> >+#endif > #include <wpe/renderer-backend-egl.h> > > namespace WebCore { >diff --git a/Source/WebCore/platform/graphics/egl/GLContextEGLWayland.cpp b/Source/WebCore/platform/graphics/egl/GLContextEGLWayland.cpp >index a0ed56fd91f174dbffa7feba01c61364a7848d08..28a4ba023abf491038444606ff374a74dd97a223 100644 >--- a/Source/WebCore/platform/graphics/egl/GLContextEGLWayland.cpp >+++ b/Source/WebCore/platform/graphics/egl/GLContextEGLWayland.cpp >@@ -25,7 +25,11 @@ > // These includes need to be in this order because wayland-egl.h defines WL_EGL_PLATFORM > // and egl.h checks that to decide whether it's Wayland platform. > #include <wayland-egl.h> >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> >+#endif > > namespace WebCore { > >diff --git a/Source/WebCore/platform/graphics/egl/GLContextEGLX11.cpp b/Source/WebCore/platform/graphics/egl/GLContextEGLX11.cpp >index 8fdd4cad31ab8c0645efa2e61ee7e874dce4bd99..00b3ed017c3735112a0eec6053cf8f09d78d20c3 100644 >--- a/Source/WebCore/platform/graphics/egl/GLContextEGLX11.cpp >+++ b/Source/WebCore/platform/graphics/egl/GLContextEGLX11.cpp >@@ -23,9 +23,14 @@ > #include "PlatformDisplayX11.h" > #include "XErrorTrapper.h" > #include "XUniquePtr.h" >-#include <EGL/egl.h> > #include <X11/Xlib.h> > >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else >+#include <EGL/egl.h> >+#endif >+ > namespace WebCore { > > GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, XUniquePixmap&& pixmap) >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >index be52152183fed6d4d1e776acebf0534fef6f881e..56b8174999e3c5eba893167d770204bb8fa1d14c 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >@@ -59,6 +59,12 @@ > #endif > > #include <gst/app/gstappsink.h> >+ >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#define GL_EXT_blend_func_extended 1 >+#endif >+ > #define GST_USE_UNSTABLE_API > #include <gst/gl/gl.h> > #undef GST_USE_UNSTABLE_API >@@ -70,9 +76,7 @@ > #endif > > #if USE(EGL) >-#if !PLATFORM(WPE) > #include "GLContextEGL.h" >-#endif > #include <gst/gl/egl/gstgldisplay_egl.h> > #endif > >@@ -95,6 +99,9 @@ > #endif // USE(GSTREAMER_GL) > > #if USE(TEXTURE_MAPPER_GL) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#endif > #include "BitmapTextureGL.h" > #include "BitmapTexturePool.h" > #include "TextureMapperGL.h" >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp >index 5da6320354c14e82cc957cad78407361a24582f8..bf334cdb2cf418ba88a916722473074f664e8ef2 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp >@@ -35,7 +35,9 @@ > #include <OpenGLES/ES2/glext.h> > #elif PLATFORM(MAC) > #include <OpenGL/gl.h> >-#elif PLATFORM(GTK) || PLATFORM(WIN) >+#elif USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif PLATFORM(WIN) > #include "OpenGLShims.h" > #endif > >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >index 4fcd7094fdee45022873a941e753af00e7abc8fe..92bde6f74cfc9cca59ff94abfc349cf33514dcc2 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >@@ -36,7 +36,9 @@ > #include <OpenGLES/ES2/glext.h> > #include <OpenGLES/ES3/gl.h> > #else >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include "EpoxyShims.h" >+#elif USE(OPENGL_ES_2) > #include "OpenGLESShims.h" > #define GL_GLEXT_PROTOTYPES 1 > #include <GLES2/gl2.h> >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp >index 958e093834ba21415fc23f2b1417eb028057b75f..f4b057c4beb5e2b6dcf0bf5aba2a1173613a0a05 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp >@@ -33,7 +33,15 @@ > #if ENABLE(GRAPHICS_CONTEXT_3D) > #include "GraphicsContext3D.h" > #include "NotImplemented.h" >+ >+#if USE(LIBEPOXY) >+#if PLATFORM(WPE) >+#define USE_WPE >+#endif >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> >+#endif > > namespace WebCore { > >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h >index 7e48bf6bf065fecc9246d64604e8f768686c113a..8c493c0c9e6cd4d82b29a79e701d19e8727d5948 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h >@@ -30,9 +30,13 @@ > > #if USE(OPENGL_ES_2) > >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#else > #define GL_GLEXT_PROTOTYPES 1 > #include <GLES2/gl2.h> > #include <GLES2/gl2ext.h> >+#endif > > #ifndef GL_EXT_robustness > /* reuse GL_NO_ERROR */ >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp >index 25c9a221cf9e26f721086451d6ee3bfa58128b6c..a6453a4bf9ba2575be583c9516d2666b7c2bfc0e 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp >@@ -58,7 +58,9 @@ > #include <OpenGL/gl.h> > #include <OpenGL/gl3.h> > #undef GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED >-#elif PLATFORM(GTK) || PLATFORM(WIN) >+#elif USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif PLATFORM(WIN) > #include "OpenGLShims.h" > #endif > >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >index 192c2b38e71b6ce71314c3ad597c09b2e1444c16..d807d45cb894baef2da94dba0dc0bd524f8c8e1d 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >@@ -64,7 +64,9 @@ > #define GL_RGBA32F_ARB 0x8814 > #define GL_RGB32F_ARB 0x8815 > #else >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include "EpoxyShims.h" >+#elif USE(OPENGL_ES_2) > #include "OpenGLESShims.h" > #elif PLATFORM(MAC) > #define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED >diff --git a/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp b/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp >index eac31e71a70aacc500a4e424564a289af57d42b5..f11db416de959ba8c848ed5b749a400ddf537de4 100644 >--- a/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp >+++ b/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp >@@ -29,7 +29,9 @@ > #if ENABLE(GRAPHICS_CONTEXT_3D) > #include "TemporaryOpenGLSetting.h" > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include "EpoxyShims.h" >+#elif USE(OPENGL_ES_2) > #define GL_GLEXT_PROTOTYPES 1 > #include <GLES2/gl2.h> > #include "OpenGLESShims.h" >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp >index 7b53691a4ad6426a73409769b560ee065b376252..f7a154e494b071091e843ae04fa360f0678f7cf0 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp >@@ -22,7 +22,9 @@ > > #if ENABLE(GRAPHICS_CONTEXT_3D) && USE(TEXTURE_MAPPER) > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL_ES_2) > #define GL_GLEXT_PROTOTYPES 1 > #include <GLES2/gl2.h> > #include <GLES2/gl2ext.h> >diff --git a/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp b/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp >index 702eb820441a4bb482752e109d2a4f06b24a821f..ef861d8eb4cef05fdcc8b0504d34c760a8bfc76c 100644 >--- a/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp >+++ b/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp >@@ -32,7 +32,11 @@ > // FIXME: For now default to the GBM EGL platform, but this should really be > // somehow deducible from the build configuration. > #define __GBM__ 1 >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> >+#endif > #include <wpe/renderer-backend-egl.h> > > namespace WebCore { >diff --git a/Source/WebKit2/PlatformWPE.cmake b/Source/WebKit2/PlatformWPE.cmake >index 3f7c00ff62bca429f95c638b5fa166f721de1362..e4cada5df6ce4190c4e7fbec5f76c565811cc0e4 100644 >--- a/Source/WebKit2/PlatformWPE.cmake >+++ b/Source/WebKit2/PlatformWPE.cmake >@@ -414,7 +414,6 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES > "${WTF_DIR}/wtf/gobject" > "${WTF_DIR}" > ${CAIRO_INCLUDE_DIRS} >- ${EGL_INCLUDE_DIRS} > ${FREETYPE2_INCLUDE_DIRS} > ${GLIB_INCLUDE_DIRS} > ${GSTREAMER_INCLUDE_DIRS} >@@ -434,6 +433,12 @@ list(APPEND WebKit2_LIBRARIES > ${WPE_LIBRARIES} > ) > >+#if (NOT USE_LIBEPOXY) >+# list(APPEND WebKit2_INCLUDE_DIRECTORIES >+# ${EGL_INCLUDE_DIRS} >+# ) >+#endif () >+ > set(InspectorFiles > ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js > ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html >diff --git a/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp b/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >index e8ee9424115cc87f7f1b86ba9040a76b1a6760bf..555914bccc6770d9c264546c3e15e851b54f62b2 100644 >--- a/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >+++ b/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >@@ -34,7 +34,9 @@ > #include <WebCore/TransformationMatrix.h> > #include <wtf/SetForScope.h> > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL_ES_2) > #include <GLES2/gl2.h> > #else > #include <GL/gl.h> >diff --git a/Source/cmake/FindLibEpoxy.cmake b/Source/cmake/FindLibEpoxy.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..b9db4e9e3c7d021f811fb155398c9dbdb38241b5 >--- /dev/null >+++ b/Source/cmake/FindLibEpoxy.cmake >@@ -0,0 +1,46 @@ >+# - Try to find libepoxy. >+# Once done, this will define >+# >+# LIBEPOXY_INCLUDE_DIRS - the libtasn1 include directories >+# LIBEPOXY_LIBRARIES - the libtasn1 libraries. >+# >+# Copyright (C) 2017 Igalia S.L. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+# THE POSSIBILITY OF SUCH DAMAGE. >+ >+find_package(PkgConfig) >+pkg_check_modules(PC_LIBEPOXY QUIET epoxy) >+ >+find_path(LIBEPOXY_INCLUDE_DIRS >+ NAMES epoxy/gl.h >+ PATHS ${PC_LIBEPOXY_INCLUDEDIR} ${PC_LIBEPOXY_INCLUDE_DIRS} >+) >+ >+find_library(LIBEPOXY_LIBRARIES >+ NAMES epoxy >+ PATHS ${PC_LIBEPOXY_LIBDIR} ${PC_LIBEPOXY_LIBRARY_DIRS} >+) >+ >+mark_as_advanced(LIBEPOXY_INCLUDE_DIRS LIBEPOXY_LIBRARIES) >+ >+include(FindPackageHandleStandardArgs) >+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBEPOXY REQUIRED_VARS LIBEPOXY_INCLUDE_DIRS LIBEPOXY_LIBRARIES) >diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake >index d36304646d0dd549fc0db2dc1570d5eb57e923ce..5aeaddf326f0217bd723c100f876bd5bb67f5761 100644 >--- a/Source/cmake/OptionsWPE.cmake >+++ b/Source/cmake/OptionsWPE.cmake >@@ -75,6 +75,7 @@ find_package(Fontconfig 2.8.0 REQUIRED) > find_package(Freetype2 2.4.2 REQUIRED) > find_package(HarfBuzz 0.9.18 REQUIRED) > find_package(JPEG REQUIRED) >+find_package(LibEpoxy REQUIRED) > find_package(LibGcrypt 1.6.0 REQUIRED) > find_package(LibSoup 2.42.0 REQUIRED) > find_package(LibXml2 2.8.0 REQUIRED) >@@ -83,9 +84,6 @@ find_package(PNG REQUIRED) > find_package(Sqlite REQUIRED) > find_package(WebP REQUIRED) > >-find_package(OpenGLES2 REQUIRED) >-find_package(EGL REQUIRED) >- > find_package(WPEBackend REQUIRED) > > set(USE_CAIRO ON) >@@ -137,6 +135,7 @@ add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}") > > set(USE_UDIS86 1) > >+SET_AND_EXPOSE_TO_BUILD(USE_LIBEPOXY TRUE) > SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_2 TRUE) > SET_AND_EXPOSE_TO_BUILD(USE_EGL TRUE) > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 4dd0e8534f43af752e25bb4115141573c3977952..dbb05a4e941a86be3a44f4de94be4a0dd9e12480 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2017-07-05 Zan Dobersek <zdobersek@igalia.com> >+ >+ [WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitTestRunner/wpe/HeadlessViewBackend.h: >+ > 2017-07-04 Michael Catanzaro <mcatanzaro@igalia.com> > > Remove unused EFL logo from bot watcher dashboard >diff --git a/Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h b/Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h >index 62186121a8c22c1f83d6b22e520f773edddc9de1..17ab568ce65b9fa0d3bca840637e51b9b4d99ac8 100644 >--- a/Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h >+++ b/Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h >@@ -26,10 +26,7 @@ > #pragma once > > #include <gbm.h> >-#include <EGL/egl.h> >-#include <EGL/eglext.h> >-#include <GLES2/gl2.h> >-#include <GLES2/gl2ext.h> >+#include <epoxy/egl.h> > #include <cairo.h> > #include <glib.h> > #include <unordered_map> >diff --git a/ChangeLog b/ChangeLog >index 6bfd230c12353f6684894757cc6b8e0546d7e19e..af107152280738f44a97b89c331a8c7e7581983f 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,13 @@ >+2017-07-05 Zan Dobersek <zdobersek@igalia.com> >+ >+ [WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/FindLibEpoxy.cmake: Added. >+ * Source/cmake/OptionsWPE.cmake: >+ > 2017-06-28 Stephan Szabo <stephan.szabo@am.sony.com> > > [Win] Build JSCOnly on Windows with clang-cl
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 172104
:
310114
|
311580
|
312662
|
313394
|
314638
|
314826
|
314967
|
315233