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-20170612160936.patch (text/plain), 30.16 KB, created by
Zan Dobersek
on 2017-06-12 07:09:38 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2017-06-12 07:09:38 PDT
Size:
30.16 KB
patch
obsolete
>Subversion Revision: 218098 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e753e66f8c70e9eb86c6af272901d8ecf5461686..3fb5a8cbbbe3b2c4f423bac90dfe0c63ece8d942 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,39 @@ >+2017-06-12 Zan Dobersek <zdobersek@igalia.com> >+ >+ [GTK][WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * CMakeLists.txt: >+ * PlatformGTK.cmake: >+ * PlatformWPE.cmake: >+ * platform/graphics/ANGLEWebKitBridge.h: >+ * platform/graphics/GLContext.cpp: >+ (WebCore::initializeOpenGLShimsIfNeeded): >+ * platform/graphics/GLContext.h: >+ * platform/graphics/GraphicsContext3DPrivate.cpp: >+ * platform/graphics/PlatformDisplay.cpp: >+ * platform/graphics/cairo/GraphicsContext3DCairo.cpp: >+ (WebCore::GraphicsContext3D::create): >+ * platform/graphics/egl/GLContextEGL.cpp: >+ * platform/graphics/egl/GLContextEGLWayland.cpp: >+ * platform/graphics/egl/GLContextEGLX11.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/wayland/PlatformDisplayWayland.cpp: >+ * platform/graphics/wpe/PlatformDisplayWPE.cpp: >+ * platform/graphics/wpe/PlatformDisplayWPE.h: >+ * platform/graphics/x11/PlatformDisplayX11.cpp: >+ > 2017-06-09 Ryosuke Niwa <rniwa@webkit.org> > > didMoveToNewDocument doesn't get called on an Attr inside a shadow tree >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index 1cdd58b8e9b2f2a19d52963f511c100cd80fe46a..452a62f054f51b9310d2e23dab37714ed40ef27c 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,15 @@ >+2017-06-12 Zan Dobersek <zdobersek@igalia.com> >+ >+ [GTK][WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PlatformWPE.cmake: >+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: >+ * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: >+ * UIProcess/gtk/WaylandCompositor.cpp: >+ > 2017-06-12 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Prefer to use private WebKitWebView API over WebKitWebViewBase >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index ddda6001c477b8e5f550ffd7a8a19f1c658c314a..fb076492d2aae16457d7c30481c415e0ae02d686 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -3317,7 +3317,14 @@ 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_LIBEPOXY) >+ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES >+ ${LIBEPOXY_INCLUDE_DIRS} >+ ) >+ list(APPEND WebCore_LIBRARIES >+ ${LIBEPOXY_LIBRARIES} >+ ) >+ elseif (USE_OPENGL) > list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES > ${OPENGL_INCLUDE_DIRS} > ) >@@ -3335,7 +3342,8 @@ if (ENABLE_GRAPHICS_CONTEXT_3D) > add_definitions(${OPENGLES2_DEFINITIONS}) > endif () > >- if (USE_EGL) >+ if (USE_LIBEPOXY) >+ elseif (USE_EGL) > list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES > ${EGL_INCLUDE_DIRS} > ) >diff --git a/Source/WebCore/PlatformGTK.cmake b/Source/WebCore/PlatformGTK.cmake >index 90e1fe1aee01ae2af32baf17330dbf200f58527f..aea08cfefec7c1a4c67ec6f7db1a1c52fb0c8aa6 100644 >--- a/Source/WebCore/PlatformGTK.cmake >+++ b/Source/WebCore/PlatformGTK.cmake >@@ -260,8 +260,6 @@ endif () > > if (USE_OPENGL) > list(APPEND WebCore_SOURCES >- platform/graphics/OpenGLShims.cpp >- > platform/graphics/opengl/Extensions3DOpenGL.cpp > platform/graphics/opengl/GraphicsContext3DOpenGL.cpp > ) >diff --git a/Source/WebCore/PlatformWPE.cmake b/Source/WebCore/PlatformWPE.cmake >index 415727500ea39be248e262b9ff5f8893ef578a55..97ee7b3daccf76b0c3bb59ea42ac095686b88052 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} >@@ -179,7 +178,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 2accfad1596b884df4424664a5c7ee9ae75990a3..ab5fb225c4413223399e3f3ef6c5a7a27e48ed40 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/CString.h> > #include <wtf/text/WTFString.h> >@@ -37,7 +41,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..ca6f189d5f98e579e1661052e918d3847119ddd0 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/EpoxyShims.h >@@ -0,0 +1,48 @@ >+#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 2bba7fbe594fe6e6e804b516974da25a9726689e..69b4f70ea18c5c1852cfce7ff914ace52b86f4d4 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..91f2e770d7e388f6359efa9bb3c446422143a84a 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/egl.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..396d400c073d498df1fef9f031bc99adaddb99b7 100644 >--- a/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp >+++ b/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp >@@ -25,7 +25,7 @@ > // FIXME: For now default to the GBM EGL platform, but this should really be > // somehow deducible from the build configuration. > #define __GBM__ 1 >-#include <EGL/egl.h> >+#include <epoxy/egl.h> > #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 de5e798a09e843383460b63038ba621463ddc220..4b8b5434000c245623f19e100dd558fa4161078f 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >@@ -58,6 +58,16 @@ > #endif > > #include <gst/app/gstappsink.h> >+ >+#if USE(LIBEPOXY) >+#if USE(EGL) >+#include <epoxy/egl.h> >+#else >+#include <epoxy/gl.h> >+#endif >+#define GL_EXT_blend_func_extended 1 >+#endif >+ > #define GST_USE_UNSTABLE_API > #include <gst/gl/gl.h> > #undef GST_USE_UNSTABLE_API >@@ -69,9 +79,7 @@ > #endif > > #if USE(EGL) >-#if !PLATFORM(WPE) > #include "GLContextEGL.h" >-#endif > #include <gst/gl/egl/gstgldisplay_egl.h> > #endif > >@@ -94,6 +102,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 a162bb8503cfa8170c40a3172f6dc813ad5d51ea..8c8a1b43c942bc4ab031fb90933fcf6789111c79 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/wayland/PlatformDisplayWayland.cpp b/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp >index dac01d846aa36a31b6b5d9e52fffa4f6f9f01999..067b11f1d837db9707f825e771dc3a8bb8b5612a 100644 >--- a/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp >+++ b/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp >@@ -30,12 +30,17 @@ > > #include "GLContextEGL.h" > #include <cstring> >+#include <wtf/Assertions.h> >+ > // 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> > #include <EGL/eglext.h> >-#include <wtf/Assertions.h> >+#endif > > namespace WebCore { > >diff --git a/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp b/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp >index 702eb820441a4bb482752e109d2a4f06b24a821f..daeb77df89e792b62bb46c379d7224af49c328e4 100644 >--- a/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp >+++ b/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp >@@ -32,7 +32,7 @@ > // FIXME: For now default to the GBM EGL platform, but this should really be > // somehow deducible from the build configuration. > #define __GBM__ 1 >-#include <EGL/egl.h> >+#include <epoxy/egl.h> > #include <wpe/renderer-backend-egl.h> > > namespace WebCore { >diff --git a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp >index 5aefe6d51de620a92593e198fb9365dfc89ecf9c..1a88ffe868a4c7fb8d444720f0acf5c60afc8ed4 100644 >--- a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp >+++ b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp >@@ -36,9 +36,13 @@ > #endif > > #if USE(EGL) >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else > #include <EGL/egl.h> > #include <EGL/eglext.h> > #endif >+#endif > > namespace WebCore { > >diff --git a/Source/WebKit2/PlatformWPE.cmake b/Source/WebKit2/PlatformWPE.cmake >index a4babfb1d149c09d2aff3dd1fba5488217a371fa..887b1643a0edc8129ff1193cb976dd9840029bc2 100644 >--- a/Source/WebKit2/PlatformWPE.cmake >+++ b/Source/WebKit2/PlatformWPE.cmake >@@ -246,7 +246,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} >@@ -266,6 +265,13 @@ list(APPEND WebKit2_LIBRARIES > ${WPE_LIBRARIES} > ) > >+if (USE_LIBEPOXY) >+else () >+ 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 29f0f602e2ece9faec2bf61ebfb33b62426ff711..d1bc19e38bf3d2ad6eaca3de615e4ae0fee2d56e 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/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp b/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >index 12e03c43f597933d3aa7921d81a43035067a52dd..43dff61756a3f9b0179b3a2fe056a1cbdb327f2f 100644 >--- a/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >+++ b/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >@@ -33,7 +33,9 @@ > #include <WebCore/CairoUtilities.h> > #include <WebCore/RefPtrCairo.h> > >-#if USE(OPENGL_ES_2) >+#if USE(LIBEPOXY) >+#include <epoxy/gl.h> >+#elif USE(OPENGL_ES_2) > #include <GLES2/gl2.h> > #else > #include <WebCore/OpenGLShims.h> >diff --git a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp >index 64692da8fe8dc3fd514e47ee218f4c1e71c55cfb..0b30a0e16e27c21a7e77aa05cae165c134939c67 100644 >--- a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp >+++ b/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp >@@ -29,20 +29,25 @@ > #if PLATFORM(WAYLAND) && USE(EGL) > > #include "WebKit2WaylandServerProtocol.h" >-#include <EGL/egl.h> >-#include <EGL/eglext.h> > #include <WebCore/GLContext.h> > #include <WebCore/PlatformDisplayWayland.h> > #include <WebCore/Region.h> > #include <wayland-server-protocol.h> > #include <wtf/UUID.h> > >+#if USE(LIBEPOXY) >+#include <epoxy/egl.h> >+#else >+#include <EGL/egl.h> >+#include <EGL/eglext.h> >+ > #if USE(OPENGL_ES_2) > #include <GLES2/gl2.h> > #include <GLES2/gl2ext.h> > #else > #include <WebCore/OpenGLShims.h> > #endif >+#endif > > using namespace WebCore; > >@@ -72,6 +77,10 @@ typedef EGLBoolean (*PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay, EGLImageKHR); > typedef void (*PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES); > #endif > >+#if !defined(EGL_WAYLAND_BUFFER_WL) >+#define EGL_WAYLAND_BUFFER_WL 0x31D5 >+#endif >+ > static PFNEGLBINDWAYLANDDISPLAYWL eglBindWaylandDisplay; > static PFNEGLUNBINDWAYLANDDISPLAYWL eglUnbindWaylandDisplay; > static PFNEGLQUERYWAYLANDBUFFERWL eglQueryWaylandBuffer; >diff --git a/Source/cmake/FindLibEpoxy.cmake b/Source/cmake/FindLibEpoxy.cmake >new file mode 100644 >index 0000000000000000000000000000000000000000..d490d8681502267ed174369fde1706789118f531 >--- /dev/null >+++ b/Source/cmake/FindLibEpoxy.cmake >@@ -0,0 +1,17 @@ >+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/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake >index df30962e6f97e03967ffcd30afad0f124406a66e..72c32546b49fc58d59a14b9fddf13540f06adf0d 100644 >--- a/Source/cmake/OptionsGTK.cmake >+++ b/Source/cmake/OptionsGTK.cmake >@@ -49,8 +49,9 @@ find_package(WebP REQUIRED) > find_package(ATSPI 2.5.3) > find_package(EGL) > find_package(GTKUnixPrint) >-find_package(OpenGL) >-find_package(OpenGLES2) >+#find_package(OpenGL) >+#find_package(OpenGLES2) >+find_package(LibEpoxy) > > WEBKIT_OPTION_BEGIN() > >@@ -283,16 +284,16 @@ if (ENABLE_OPENGL) > # ENABLE_OPENGL is true if either USE_OPENGL or ENABLE_GLES2 is true. > # But USE_OPENGL is the opposite of ENABLE_GLES2. > if (ENABLE_GLES2) >- find_package(OpenGLES2 REQUIRED) >+ # find_package(OpenGLES2 REQUIRED) > SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_2 TRUE) > >- if (NOT EGL_FOUND) >- message(FATAL_ERROR "EGL is needed for ENABLE_GLES2.") >- endif () >+ # if (NOT EGL_FOUND) >+ # message(FATAL_ERROR "EGL is needed for ENABLE_GLES2.") >+ # endif () > else () >- if (NOT OPENGL_FOUND) >- message(FATAL_ERROR "Either OpenGL or OpenGLES2 is needed for ENABLE_OPENGL.") >- endif () >+ # if (NOT OPENGL_FOUND) >+ # message(FATAL_ERROR "Either OpenGL or OpenGLES2 is needed for ENABLE_OPENGL.") >+ # endif () > SET_AND_EXPOSE_TO_BUILD(USE_OPENGL TRUE) > endif () > >@@ -300,6 +301,8 @@ if (ENABLE_OPENGL) > message(FATAL_ERROR "Either GLX or EGL is needed for ENABLE_OPENGL.") > endif () > >+ SET_AND_EXPOSE_TO_BUILD(USE_LIBEPOXY TRUE) >+ > SET_AND_EXPOSE_TO_BUILD(ENABLE_GRAPHICS_CONTEXT_3D TRUE) > > SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL TRUE) >diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake >index dc5caaf3883aba2341ccdf19975f34699b6ca506..e9d50217b03e50a1127d3c8d67021321e79c8410 100644 >--- a/Source/cmake/OptionsWPE.cmake >+++ b/Source/cmake/OptionsWPE.cmake >@@ -81,8 +81,9 @@ find_package(PNG REQUIRED) > find_package(Sqlite REQUIRED) > find_package(WebP REQUIRED) > >-find_package(OpenGLES2 REQUIRED) >-find_package(EGL REQUIRED) >+#find_package(OpenGLES2 REQUIRED) >+#find_package(EGL REQUIRED) >+find_package(LibEpoxy REQUIRED) > > find_package(WPEBackend REQUIRED) > >@@ -130,6 +131,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/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 3f1045cbc3ba5c390a536d2ac0a8dcd41f94b15f..cfcfc60d1d6567dc0043e2ab0671d069e9fe9ce6 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,14 @@ >+2017-06-12 Zan Dobersek <zdobersek@igalia.com> >+ >+ [GTK][WPE] Use libepoxy >+ https://bugs.webkit.org/show_bug.cgi?id=172104 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/FindLibEpoxy.cmake: Added. >+ * Source/cmake/OptionsGTK.cmake: >+ * Source/cmake/OptionsWPE.cmake: >+ > 2017-06-09 Zan Dobersek <zdobersek@igalia.com> > > [WPE] Enable ENCRYPTED_MEDIA for build-webkit builds
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