Title: [181379] releases/WebKitGTK/webkit-2.8
- Revision
- 181379
- Author
- carlo...@webkit.org
- Date
- 2015-03-11 03:20:31 -0700 (Wed, 11 Mar 2015)
Log Message
Merge r181321 - [GTK] Add a configure option to build with OpenGL ES 2
https://bugs.webkit.org/show_bug.cgi?id=142498
Patch by Carlos Garcia Campos <cgar...@igalia.com> and José Dapena Paz <jdap...@igalia.com> on 2015-03-10
Reviewed by Martin Robinson.
.:
Add ENABLE_GLES2 option. It's disabled by default, but if passed
GLES2 is required and OpenGL is not even searched. Otherwise we
search for OpenGL as usual, using it only if present.
* Source/cmake/OptionsGTK.cmake:
Source/WebCore:
Build GLES or GL specific files depending on the build options.
* PlatformGTK.cmake:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.8/ChangeLog (181378 => 181379)
--- releases/WebKitGTK/webkit-2.8/ChangeLog 2015-03-11 10:19:01 UTC (rev 181378)
+++ releases/WebKitGTK/webkit-2.8/ChangeLog 2015-03-11 10:20:31 UTC (rev 181379)
@@ -1,3 +1,16 @@
+2015-03-10 Carlos Garcia Campos <cgar...@igalia.com> and José Dapena Paz <jdap...@igalia.com>
+
+ [GTK] Add a configure option to build with OpenGL ES 2
+ https://bugs.webkit.org/show_bug.cgi?id=142498
+
+ Reviewed by Martin Robinson.
+
+ Add ENABLE_GLES2 option. It's disabled by default, but if passed
+ GLES2 is required and OpenGL is not even searched. Otherwise we
+ search for OpenGL as usual, using it only if present.
+
+ * Source/cmake/OptionsGTK.cmake:
+
2015-03-03 Carlos Garcia Campos <cgar...@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.91 release.
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (181378 => 181379)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-03-11 10:19:01 UTC (rev 181378)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-03-11 10:20:31 UTC (rev 181379)
@@ -1,3 +1,14 @@
+2015-03-10 Carlos Garcia Campos <cgar...@igalia.com> and José Dapena Paz <jdap...@igalia.com>
+
+ [GTK] Add a configure option to build with OpenGL ES 2
+ https://bugs.webkit.org/show_bug.cgi?id=142498
+
+ Reviewed by Martin Robinson.
+
+ Build GLES or GL specific files depending on the build options.
+
+ * PlatformGTK.cmake:
+
2015-03-10 Zan Dobersek <zdober...@igalia.com>
Shrink the CSSPropertyID enum type
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake (181378 => 181379)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake 2015-03-11 10:19:01 UTC (rev 181378)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake 2015-03-11 10:20:31 UTC (rev 181379)
@@ -65,7 +65,6 @@
platform/graphics/GraphicsContext3DPrivate.cpp
platform/graphics/ImageSource.cpp
- platform/graphics/OpenGLShims.cpp
platform/graphics/WOFFFileFormat.cpp
platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
@@ -116,10 +115,7 @@
platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
platform/graphics/harfbuzz/HarfBuzzShaper.cpp
- platform/graphics/opengl/Extensions3DOpenGL.cpp
platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
- platform/graphics/opengl/Extensions3DOpenGLES.cpp
- platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
platform/graphics/opengl/TemporaryOpenGLSetting.cpp
@@ -405,6 +401,22 @@
)
endif ()
+if (WTF_USE_OPENGL_ES_2)
+ list(APPEND WebCore_SOURCES
+ platform/graphics/opengl/Extensions3DOpenGLES.cpp
+ platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+ )
+endif ()
+
+if (WTF_USE_OPENGL)
+ list(APPEND WebCore_SOURCES
+ platform/graphics/OpenGLShims.cpp
+
+ platform/graphics/opengl/Extensions3DOpenGL.cpp
+ platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
+ )
+endif ()
+
if (ENABLE_PLUGIN_PROCESS_GTK2)
# WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
# dependent files into a separate library which can be used to construct a GTK+2 WebCore
Modified: releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake (181378 => 181379)
--- releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake 2015-03-11 10:19:01 UTC (rev 181378)
+++ releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake 2015-03-11 10:20:31 UTC (rev 181379)
@@ -16,6 +16,7 @@
set(ENABLE_X11_TARGET ON CACHE BOOL "Whether to enable support for the X11 windowing target.")
set(ENABLE_WAYLAND_TARGET OFF CACHE BOOL "Whether to enable support for the Wayland windowing target.")
set(ENABLE_INTROSPECTION ON CACHE BOOL "Whether to enable GObject introspection.")
+set(ENABLE_GLES2 OFF CACHE BOOL "Whether to enable OpenGL ES 2.0.")
# These are shared variables, but we special case their definition so that we can use the
# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
@@ -46,7 +47,6 @@
find_package(WebP REQUIRED)
find_package(ATSPI 2.5.3)
find_package(GObjectIntrospection)
-find_package(OpenGL)
find_package(EGL)
find_package(GeoClue2 2.1.5)
find_package(GnuTLS 3.0.0)
@@ -56,31 +56,47 @@
find_package(GeoClue)
endif ()
+if (ENABLE_GLES2)
+ find_package(OpenGLES2 REQUIRED)
+ if (OPENGLES2_FOUND AND NOT(EGL_FOUND))
+ message(FATAL_ERROR "EGL is needed for OpenGL ES 2.0.")
+ endif ()
+else ()
+ find_package(OpenGL)
+endif ()
+
if (ENABLE_X11_TARGET)
# With cmake 3.2.x we have to explicitly ask for X11 otherwise the X11_X11_LIB
# variable won't be set thus the X11 linker flags won't be added and the build
# will fail.
find_package(X11 REQUIRED)
- # We don't use find_package for GLX because it is part of -lGL, unlike EGL.
- check_include_files("GL/glx.h" GLX_FOUND)
+ if (OPENGL_FOUND)
+ # We don't use find_package for GLX because it is part of -lGL, unlike EGL.
+ check_include_files("GL/glx.h" GLX_FOUND)
+ endif ()
endif ()
WEBKIT_OPTION_BEGIN()
WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 "Whether to build WebKitPluginProcess2 to load GTK2 based plugins." ON)
-if (OPENGL_FOUND AND (GLX_FOUND OR EGL_FOUND))
+if ((OPENGL_FOUND OR OPENGLES2_FOUND) AND (GLX_FOUND OR EGL_FOUND))
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL ON)
- if (GLX_FOUND)
- list(APPEND CAIRO_GL_COMPONENTS cairo-glx)
- endif ()
- if (EGL_FOUND)
- list(APPEND CAIRO_GL_COMPONENTS cairo-egl)
- endif ()
- find_package(CairoGL 1.10.2 COMPONENTS ${CAIRO_GL_COMPONENTS})
- if (CAIRO_GL_FOUND)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS ON)
+ if (OPENGL_FOUND)
+ if (GLX_FOUND)
+ list(APPEND CAIRO_GL_COMPONENTS cairo-glx)
+ endif ()
+ if (EGL_FOUND)
+ list(APPEND CAIRO_GL_COMPONENTS cairo-egl)
+ endif ()
+ find_package(CairoGL 1.10.2 COMPONENTS ${CAIRO_GL_COMPONENTS})
+ if (CAIRO_GL_FOUND)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS ON)
+ else ()
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS OFF)
+ endif ()
else ()
+ # FIXME: Should we search for cairo-glesv2 instead of cairo-gl in this case?
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS OFF)
endif ()
else ()
@@ -315,16 +331,23 @@
find_package(Enchant REQUIRED)
endif ()
-if (OPENGL_FOUND AND (GLX_FOUND OR EGL_FOUND))
+if ((OPENGL_FOUND OR OPENGLES2_FOUND) AND (GLX_FOUND OR EGL_FOUND))
set(ENABLE_TEXTURE_MAPPER 1)
set(WTF_USE_3D_GRAPHICS 1)
- add_definitions(-DWTF_USE_OPENGL=1)
add_definitions(-DWTF_USE_3D_GRAPHICS=1)
add_definitions(-DWTF_USE_TEXTURE_MAPPER=1)
add_definitions(-DWTF_USE_TEXTURE_MAPPER_GL=1)
add_definitions(-DENABLE_3D_RENDERING=1)
+ if (OPENGLES2_FOUND)
+ set(WTF_USE_OPENGL_ES_2 1)
+ add_definitions(-DWTF_USE_OPENGL_ES_2=1)
+ else ()
+ set(WTF_USE_OPENGL 1)
+ add_definitions(-DWTF_USE_OPENGL=1)
+ endif ()
+
if (EGL_FOUND)
add_definitions(-DWTF_USE_EGL=1)
endif ()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes