Changeset 219391 in webkit
- Timestamp:
- Jul 12, 2017 6:58:46 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r219384 r219391 1 2017-07-12 Zan Dobersek <zdobersek@igalia.com> 2 3 [WPE] Use libepoxy 4 https://bugs.webkit.org/show_bug.cgi?id=172104 5 6 Reviewed by Michael Catanzaro. 7 8 * Source/cmake/FindLibEpoxy.cmake: Added. 9 * Source/cmake/OptionsWPE.cmake: Find libepoxy, don't search for 10 EGL or OpenGL ES anymore, and enable USE_LIBEPOXY by default. 11 1 12 2017-07-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 13 -
trunk/Source/WebCore/CMakeLists.txt
r219379 r219391 3326 3326 # these include directories, libraries or definitions need to be 3327 3327 # added before the ANGLE directories. 3328 if (USE_OPENGL )3328 if (USE_OPENGL AND NOT USE_LIBEPOXY) 3329 3329 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 3330 3330 ${OPENGL_INCLUDE_DIRS} … … 3334 3334 ) 3335 3335 add_definitions(${OPENGL_DEFINITIONS}) 3336 elseif (USE_OPENGL_ES_2 )3336 elseif (USE_OPENGL_ES_2 AND NOT USE_LIBEPOXY) 3337 3337 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 3338 3338 ${OPENGLES2_INCLUDE_DIRS} … … 3344 3344 endif () 3345 3345 3346 if (USE_EGL )3346 if (USE_EGL AND NOT USE_LIBEPOXY) 3347 3347 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 3348 3348 ${EGL_INCLUDE_DIRS} … … 3352 3352 ) 3353 3353 add_definitions(${EGL_DEFINITIONS}) 3354 endif () 3355 3356 if (USE_LIBEPOXY) 3357 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 3358 ${LIBEPOXY_INCLUDE_DIRS} 3359 ) 3360 list(APPEND WebCore_LIBRARIES 3361 ${LIBEPOXY_LIBRARIES} 3362 ) 3354 3363 endif () 3355 3364 -
trunk/Source/WebCore/ChangeLog
r219389 r219391 1 2017-07-12 Zan Dobersek <zdobersek@igalia.com> 2 3 [WPE] Use libepoxy 4 https://bugs.webkit.org/show_bug.cgi?id=172104 5 6 Reviewed by Michael Catanzaro. 7 8 No new tests -- no changes in behavior. 9 10 Implement the proper libepoxy header inclusion for ports that enable it. 11 12 The library acts as a loading facility working on top of the system-provided 13 OpenGL and EGL libraries, with the headers providing a complete collection of 14 specification-defined OpenGL and EGL types, constants and entrypoints. 15 16 Support is added through the USE(LIBEPOXY) build guard. Note that this guard 17 isn't exclusive with USE(OPENGL), USE(OPENGL_ES_2) or USE(EGL), so the 18 USE(LIBEPOXY) condition is tested before those. 19 20 In case of OpenGL headers, the <epoxy/gl.h> header is included, and in 21 case of EGL headers, the <epoxy/egl.h> header. <epoxy/egl.h> includes 22 <epoxy/gl.h> on its own, so in some cases the inclusion of the latter is 23 omitted. 24 25 EpoxyShims.h header is added, doing a job similar to OpenGLESShims.h. The 26 EXT-suffixed GL entrypoints are redefined to the non-suffixed versions. 27 No suffixed constants are defined because those are defined by the libepoxy 28 headers to the well-known values. 29 30 * CMakeLists.txt: 31 * PlatformWPE.cmake: 32 * platform/graphics/ANGLEWebKitBridge.h: 33 * platform/graphics/EpoxyShims.h: Added. 34 * platform/graphics/GLContext.cpp: 35 (WebCore::initializeOpenGLShimsIfNeeded): 36 * platform/graphics/GraphicsContext3DPrivate.cpp: 37 * platform/graphics/PlatformDisplay.cpp: 38 * platform/graphics/cairo/CairoUtilities.cpp: 39 * platform/graphics/cairo/GraphicsContext3DCairo.cpp: 40 (WebCore::GraphicsContext3D::create): 41 * platform/graphics/cairo/ImageBufferCairo.cpp: 42 * platform/graphics/egl/GLContextEGL.cpp: 43 * platform/graphics/egl/GLContextEGLWPE.cpp: 44 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 45 * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: 46 * platform/graphics/opengl/Extensions3DOpenGLES.cpp: 47 * platform/graphics/opengl/Extensions3DOpenGLES.h: 48 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: 49 * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: 50 * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: 51 * platform/graphics/wpe/PlatformDisplayWPE.cpp: 52 1 53 2017-07-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 54 -
trunk/Source/WebCore/PlatformWPE.cmake
r219384 r219391 162 162 list(APPEND WebCore_LIBRARIES 163 163 ${CAIRO_LIBRARIES} 164 ${EGL_LIBRARIES}165 164 ${GLIB_GIO_LIBRARIES} 166 165 ${GLIB_GMODULE_LIBRARIES} … … 180 179 list(APPEND WebCore_INCLUDE_DIRECTORIES 181 180 ${CAIRO_INCLUDE_DIRS} 182 ${EGL_INCLUDE_DIRS}183 181 ${GIO_UNIX_INCLUDE_DIRS} 184 182 ${GLIB_INCLUDE_DIRS} -
trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
r218799 r219391 27 27 #define ANGLEWebKitBridge_h 28 28 29 #if USE(LIBEPOXY) 30 // libepoxy headers have to be included before <ANGLE/ShaderLang.h> in order to avoid 31 // picking up khrplatform.h inclusion that's done in ANGLE. 32 #include <epoxy/gl.h> 33 #endif 34 29 35 #include <ANGLE/ShaderLang.h> 30 36 #include <wtf/text/WTFString.h> … … 37 43 #include "OpenGLESShims.h" 38 44 #elif PLATFORM(GTK) || PLATFORM(WPE) 39 #if USE(OPENGL_ES_2) 45 #if USE(LIBEPOXY) 46 // <epoxy/gl.h> already included above. 47 #elif USE(OPENGL_ES_2) 40 48 #include <GLES2/gl2.h> 41 49 #else -
trunk/Source/WebCore/platform/graphics/GLContext.cpp
r216497 r219391 27 27 #endif 28 28 29 #if USE(OPENGL_ES_2) 29 #if USE(LIBEPOXY) 30 #include <epoxy/gl.h> 31 #elif USE(OPENGL_ES_2) 30 32 #define GL_GLEXT_PROTOTYPES 1 31 33 #include <GLES2/gl2.h> … … 63 65 static bool initializeOpenGLShimsIfNeeded() 64 66 { 65 #if USE(OPENGL_ES_2) 67 #if USE(OPENGL_ES_2) || USE(LIBEPOXY) 66 68 return true; 67 69 #else -
trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp
r211681 r219391 27 27 28 28 29 #if USE(OPENGL_ES_2) 29 #if USE(LIBEPOXY) 30 #include <epoxy/gl.h> 31 #elif USE(OPENGL_ES_2) 30 32 #include <GLES2/gl2.h> 31 33 #include <GLES2/gl2ext.h> -
trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp
r216497 r219391 60 60 61 61 #if USE(EGL) 62 #if USE(LIBEPOXY) 63 #include <epoxy/egl.h> 64 #else 62 65 #include <EGL/egl.h> 66 #endif 63 67 #include <wtf/HashSet.h> 64 68 #include <wtf/NeverDestroyed.h> -
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
r217553 r219391 44 44 45 45 #if ENABLE(ACCELERATED_2D_CANVAS) 46 #if USE(EGL) && USE(LIBEPOXY) 47 #include <epoxy/egl.h> 48 #endif 46 49 #include <cairo-gl.h> 47 50 #endif -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp
r217298 r219391 48 48 #endif 49 49 50 #if USE(LIBEPOXY) 51 #include <epoxy/gl.h> 52 #elif USE(OPENGL) 53 #include "OpenGLShims.h" 54 #endif 55 50 56 #if USE(OPENGL_ES_2) 51 57 #include "Extensions3DOpenGLES.h" 52 58 #else 53 59 #include "Extensions3DOpenGL.h" 54 #include "OpenGLShims.h"55 60 #endif 56 61 … … 70 75 static bool success = true; 71 76 if (!initialized) { 72 #if !USE(OPENGL_ES_2) 77 #if !USE(OPENGL_ES_2) && !USE(LIBEPOXY) 73 78 success = initializeOpenGLShims(); 74 79 #endif -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r218170 r219391 51 51 #include "GLContext.h" 52 52 #include "TextureMapperGL.h" 53 54 #if USE(EGL) && USE(LIBEPOXY) 55 #include <epoxy/egl.h> 56 #endif 53 57 #include <cairo-gl.h> 54 58 -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
r217208 r219391 24 24 #include "GraphicsContext3D.h" 25 25 #include "PlatformDisplay.h" 26 27 #if USE(LIBEPOXY) 28 #include <epoxy/egl.h> 29 #else 26 30 #include <EGL/egl.h> 31 #endif 27 32 28 33 #if USE(CAIRO) … … 30 35 #endif 31 36 32 #if USE(OPENGL_ES_2) 37 #if USE(LIBEPOXY) 38 #include <epoxy/gl.h> 39 #elif USE(OPENGL_ES2) 33 40 #define GL_GLEXT_PROTOTYPES 1 34 41 #include <GLES2/gl2.h> -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp
r217208 r219391 26 26 // somehow deducible from the build configuration. 27 27 #define __GBM__ 1 28 #if USE(LIBEPOXY) 29 #include <epoxy/egl.h> 30 #else 28 31 #include <EGL/egl.h> 32 #endif 29 33 #include <wpe/renderer-backend-egl.h> 30 34 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r218832 r219391 60 60 61 61 #include <gst/app/gstappsink.h> 62 63 #if USE(LIBEPOXY) 64 // Include the <epoxy/gl.h> header before <gst/gl/gl.h>. 65 #include <epoxy/gl.h> 66 #endif 67 62 68 #define GST_USE_UNSTABLE_API 63 69 #include <gst/gl/gl.h> … … 71 77 72 78 #if USE(EGL) 73 #if !PLATFORM(WPE)74 79 #include "GLContextEGL.h" 75 #endif76 80 #include <gst/gl/egl/gstgldisplay_egl.h> 77 81 #endif -
trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
r215585 r219391 37 37 #include <OpenGLES/ES3/gl.h> 38 38 #else 39 #if USE(OPENGL_ES_2) 39 #if USE(LIBEPOXY) 40 #include "EpoxyShims.h" 41 #elif USE(OPENGL_ES_2) 40 42 #include "OpenGLESShims.h" 41 43 #define GL_GLEXT_PROTOTYPES 1 -
trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp
r208040 r219391 34 34 #include "GraphicsContext3D.h" 35 35 #include "NotImplemented.h" 36 37 #if USE(LIBEPOXY) 38 #include <epoxy/egl.h> 39 #else 36 40 #include <EGL/egl.h> 41 #endif 37 42 38 43 namespace WebCore { -
trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h
r215585 r219391 31 31 #if USE(OPENGL_ES_2) 32 32 33 #if USE(LIBEPOXY) 34 #include <epoxy/gl.h> 35 #else 33 36 #define GL_GLEXT_PROTOTYPES 1 34 37 #include <GLES2/gl2.h> 35 38 #include <GLES2/gl2ext.h> 39 #endif 36 40 37 41 #ifndef GL_EXT_robustness -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
r217298 r219391 65 65 #define GL_RGB32F_ARB 0x8815 66 66 #else 67 #if USE(OPENGL_ES_2) 67 #if USE(LIBEPOXY) 68 #include "EpoxyShims.h" 69 #elif USE(OPENGL_ES_2) 68 70 #include "OpenGLESShims.h" 69 71 #elif PLATFORM(MAC) -
trunk/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp
r215585 r219391 30 30 #include "TemporaryOpenGLSetting.h" 31 31 32 #if USE(OPENGL_ES_2) 32 #if USE(LIBEPOXY) 33 #include "EpoxyShims.h" 34 #elif USE(OPENGL_ES_2) 33 35 #define GL_GLEXT_PROTOTYPES 1 34 36 #include <GLES2/gl2.h> -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp
r218170 r219391 23 23 #if ENABLE(GRAPHICS_CONTEXT_3D) && USE(TEXTURE_MAPPER) 24 24 25 #if USE(OPENGL_ES_2) 25 #if USE(LIBEPOXY) 26 #include <epoxy/gl.h> 27 #elif USE(OPENGL_ES_2) 26 28 #define GL_GLEXT_PROTOTYPES 1 27 29 #include <GLES2/gl2.h> -
trunk/Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp
r217208 r219391 33 33 // somehow deducible from the build configuration. 34 34 #define __GBM__ 1 35 #if USE(LIBEPOXY) 36 #include <epoxy/egl.h> 37 #else 35 38 #include <EGL/egl.h> 39 #endif 36 40 #include <wpe/renderer-backend-egl.h> 37 41 -
trunk/Source/WebKit2/ChangeLog
r219388 r219391 1 2017-07-12 Zan Dobersek <zdobersek@igalia.com> 2 3 [WPE] Use libepoxy 4 https://bugs.webkit.org/show_bug.cgi?id=172104 5 6 Reviewed by Michael Catanzaro. 7 8 * PlatformWPE.cmake: Drop the EGL_INCLUDE_DIRS compilation flags. 9 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: 10 Include <epoxy/gl.h> when compiling with libepoxy usage enabled. 11 1 12 2017-07-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 13 -
trunk/Source/WebKit2/PlatformWPE.cmake
r219295 r219391 414 414 "${WTF_DIR}" 415 415 ${CAIRO_INCLUDE_DIRS} 416 ${EGL_INCLUDE_DIRS}417 416 ${FREETYPE2_INCLUDE_DIRS} 418 417 ${GLIB_INCLUDE_DIRS} -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
r219067 r219391 35 35 #include <wtf/SetForScope.h> 36 36 37 #if USE(OPENGL_ES_2) 37 #if USE(LIBEPOXY) 38 #include <epoxy/gl.h> 39 #elif USE(OPENGL_ES_2) 38 40 #include <GLES2/gl2.h> 39 41 #else -
trunk/Source/cmake/OptionsWPE.cmake
r218740 r219391 76 76 find_package(HarfBuzz 0.9.18 REQUIRED) 77 77 find_package(JPEG REQUIRED) 78 find_package(LibEpoxy REQUIRED) 78 79 find_package(LibGcrypt 1.6.0 REQUIRED) 79 80 find_package(LibSoup 2.42.0 REQUIRED) … … 83 84 find_package(Sqlite REQUIRED) 84 85 find_package(WebP REQUIRED) 85 86 find_package(OpenGLES2 REQUIRED)87 find_package(EGL REQUIRED)88 86 89 87 find_package(WPEBackend REQUIRED) … … 138 136 set(USE_UDIS86 1) 139 137 138 SET_AND_EXPOSE_TO_BUILD(USE_LIBEPOXY TRUE) 140 139 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_2 TRUE) 141 140 SET_AND_EXPOSE_TO_BUILD(USE_EGL TRUE) -
trunk/Tools/ChangeLog
r219390 r219391 1 2017-07-12 Zan Dobersek <zdobersek@igalia.com> 2 3 [WPE] Use libepoxy 4 https://bugs.webkit.org/show_bug.cgi?id=172104 5 6 Reviewed by Michael Catanzaro. 7 8 * WebKitTestRunner/wpe/HeadlessViewBackend.h: 9 Include the <epoxy/egl.h> header, dropping the EGL and GLES2 inclusions. 10 1 11 2017-07-12 Zan Dobersek <zdobersek@igalia.com> 2 12 -
trunk/Tools/WebKitTestRunner/wpe/HeadlessViewBackend.h
r216497 r219391 26 26 #pragma once 27 27 28 // This include order is necessary to enforce the GBM EGL platform. 28 29 #include <gbm.h> 29 #include <EGL/egl.h> 30 #include <EGL/eglext.h> 31 #include <GLES2/gl2.h> 32 #include <GLES2/gl2ext.h> 30 #include <epoxy/egl.h> 31 33 32 #include <cairo.h> 34 33 #include <glib.h>
Note: See TracChangeset
for help on using the changeset viewer.