Skip to content
Permalink
Browse files
[GTK] ENABLE(OPENGL) remmants...
https://bugs.webkit.org/show_bug.cgi?id=211077

Patch by Philippe Normand <pnormand@igalia.com> on 2020-04-27
Reviewed by Adrian Perez de Castro.

ENABLE(OPENGL) was renamed to ENABLE(GRAPHICS_CONTEXT_GL) in
r254064 but not in all the code base...
.:

* Source/cmake/GStreamerDependencies.cmake:
* Source/cmake/OptionsGTK.cmake:

Source/WebKit:

* UIProcess/gtk/HardwareAccelerationManager.cpp:
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager):

Canonical link: https://commits.webkit.org/223961@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Apr 27, 2020
1 parent cf98e83 commit e3a962cd9e3908b5dc7aa43ad5e37c69e8a99347
Showing 5 changed files with 40 additions and 14 deletions.
@@ -1,3 +1,16 @@
2020-04-27 Philippe Normand <pnormand@igalia.com>

[GTK] ENABLE(OPENGL) remmants...
https://bugs.webkit.org/show_bug.cgi?id=211077

Reviewed by Adrian Perez de Castro.

ENABLE(OPENGL) was renamed to ENABLE(GRAPHICS_CONTEXT_GL) in
r254064 but not in all the code base...

* Source/cmake/GStreamerDependencies.cmake:
* Source/cmake/OptionsGTK.cmake:

2020-04-27 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK4] Make it possible to build with GTK4 without errors
@@ -1,3 +1,16 @@
2020-04-27 Philippe Normand <pnormand@igalia.com>

[GTK] ENABLE(OPENGL) remmants...
https://bugs.webkit.org/show_bug.cgi?id=211077

Reviewed by Adrian Perez de Castro.

ENABLE(OPENGL) was renamed to ENABLE(GRAPHICS_CONTEXT_GL) in
r254064 but not in all the code base...

* UIProcess/gtk/HardwareAccelerationManager.cpp:
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager):

2020-04-27 Daniel Bates <dabates@apple.com>

Caret may be placed in the wrong spot for text input context that is a form control
@@ -41,7 +41,7 @@ HardwareAccelerationManager::HardwareAccelerationManager()
: m_canUseHardwareAcceleration(true)
, m_forceHardwareAcceleration(false)
{
#if !ENABLE(OPENGL)
#if !ENABLE(GRAPHICS_CONTEXT_GL)
m_canUseHardwareAcceleration = false;
return;
#endif
@@ -1,5 +1,5 @@
if (PORT STREQUAL "GTK")
WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_GRAPHICS_CONTEXT_GL)
endif ()
WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_VIDEO)
WEBKIT_OPTION_DEPEND(USE_GSTREAMER_MPEGTS ENABLE_VIDEO)
@@ -74,7 +74,7 @@ endif ()

# Set the default value for ENABLE_GLES2 automatically.
# We are not enabling or disabling automatically a feature here, because
# the feature is by default always on (ENABLE_OPENGL=ON).
# the feature is by default always on (ENABLE_GRAPHICS_CONTEXT_GL=ON).
# What we select here automatically is if we use OPENGL (ENABLE_GLES2=OFF)
# or OPENGLES2 (ENABLE_GLES2=ON) for building the feature.
set(ENABLE_GLES2_DEFAULT OFF)
@@ -89,7 +89,7 @@ endif ()
WEBKIT_OPTION_DEFINE(ENABLE_GLES2 "Whether to enable OpenGL ES 2.0." PUBLIC ${ENABLE_GLES2_DEFAULT})
WEBKIT_OPTION_DEFINE(ENABLE_GTKDOC "Whether or not to use generate gtkdoc." PUBLIC OFF)
WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_OPENGL "Whether to use OpenGL." PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_GRAPHICS_CONTEXT_GL "Whether to use OpenGL." PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK_SUPPORTS_QUARTZ})
WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK_SUPPORTS_X11})
WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK_SUPPORTS_WAYLAND})
@@ -108,13 +108,13 @@ WEBKIT_OPTION_DEFINE(USE_ANGLE_WEBGL "Whether to use ANGLE as WebGL backend." PR
# FIXME: Can we use cairo-glesv2 to avoid this conflict?
WEBKIT_OPTION_CONFLICT(ENABLE_ACCELERATED_2D_CANVAS ENABLE_GLES2)

WEBKIT_OPTION_DEPEND(ENABLE_3D_TRANSFORMS ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_ACCELERATED_2D_CANVAS ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_ASYNC_SCROLLING ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_WEBGL ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_3D_TRANSFORMS ENABLE_GRAPHICS_CONTEXT_GL)
WEBKIT_OPTION_DEPEND(ENABLE_ACCELERATED_2D_CANVAS ENABLE_GRAPHICS_CONTEXT_GL)
WEBKIT_OPTION_DEPEND(ENABLE_ASYNC_SCROLLING ENABLE_GRAPHICS_CONTEXT_GL)
WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_GRAPHICS_CONTEXT_GL)
WEBKIT_OPTION_DEPEND(ENABLE_WEBGL ENABLE_GRAPHICS_CONTEXT_GL)
WEBKIT_OPTION_DEPEND(USE_ANGLE_WEBGL ENABLE_WEBGL)
WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_GRAPHICS_CONTEXT_GL)
WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_WAYLAND_TARGET)

SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
@@ -295,8 +295,8 @@ endif ()

SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER TRUE)

if (ENABLE_OPENGL)
# ENABLE_OPENGL is true if either USE_OPENGL or ENABLE_GLES2 is true.
if (ENABLE_GRAPHICS_CONTEXT_GL)
# ENABLE_GRAPHICS_CONTEXT_GL 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)
@@ -308,13 +308,13 @@ if (ENABLE_OPENGL)
endif ()
else ()
if (NOT OPENGL_FOUND)
message(FATAL_ERROR "Either OpenGL or OpenGLES2 is needed for ENABLE_OPENGL.")
message(FATAL_ERROR "Either OpenGL or OpenGLES2 is needed for ENABLE_GRAPHICS_CONTEXT_GL.")
endif ()
SET_AND_EXPOSE_TO_BUILD(USE_OPENGL TRUE)
endif ()

if (NOT EGL_FOUND AND (NOT ENABLE_X11_TARGET OR NOT GLX_FOUND))
message(FATAL_ERROR "Either GLX or EGL is needed for ENABLE_OPENGL.")
message(FATAL_ERROR "Either GLX or EGL is needed for ENABLE_GRAPHICS_CONTEXT_GL.")
endif ()

SET_AND_EXPOSE_TO_BUILD(ENABLE_GRAPHICS_CONTEXT_GL TRUE)

0 comments on commit e3a962c

Please sign in to comment.