Title: [280287] trunk
Revision
280287
Author
[email protected]
Date
2021-07-25 11:29:26 -0700 (Sun, 25 Jul 2021)

Log Message

[GTK] USE_OPENGL_OR_ES should not be an automagic feature
https://bugs.webkit.org/show_bug.cgi?id=228266

Patch by Michael Catanzaro <[email protected]> on 2021-07-25
Reviewed by Fujii Hironori.

The USE_OPENGL_OR_ES feature flag added in r271220 is currently automagic: that is, if
neither OpenGL nor OpenGL ES is available at build time, it gets silently disabled. This is
not OK because it makes it easy for distributors to accidentally fail to enable OpenGL
support. We should require manually disabling the feature with -DUSE_OPENGL_OR_ES=OFF in
order to build with OpenGL disabled.

* Source/cmake/OptionsGTK.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (280286 => 280287)


--- trunk/ChangeLog	2021-07-25 13:00:57 UTC (rev 280286)
+++ trunk/ChangeLog	2021-07-25 18:29:26 UTC (rev 280287)
@@ -1,3 +1,18 @@
+2021-07-25  Michael Catanzaro  <[email protected]>
+
+        [GTK] USE_OPENGL_OR_ES should not be an automagic feature
+        https://bugs.webkit.org/show_bug.cgi?id=228266
+
+        Reviewed by Fujii Hironori.
+
+        The USE_OPENGL_OR_ES feature flag added in r271220 is currently automagic: that is, if
+        neither OpenGL nor OpenGL ES is available at build time, it gets silently disabled. This is
+        not OK because it makes it easy for distributors to accidentally fail to enable OpenGL
+        support. We should require manually disabling the feature with -DUSE_OPENGL_OR_ES=OFF in
+        order to build with OpenGL disabled.
+
+        * Source/cmake/OptionsGTK.cmake:
+
 2021-07-23  Philippe Normand  <[email protected]>
 
         [GLib] Remove libportal dependency

Modified: trunk/Source/cmake/OptionsGTK.cmake (280286 => 280287)


--- trunk/Source/cmake/OptionsGTK.cmake	2021-07-25 13:00:57 UTC (rev 280286)
+++ trunk/Source/cmake/OptionsGTK.cmake	2021-07-25 18:29:26 UTC (rev 280287)
@@ -49,18 +49,12 @@
     add_definitions(-DENABLE_OPENTYPE_MATH=1)
 endif ()
 
-# Set the default value for ENABLE_GLES2 and USE_OPENGL_OR_ES.
-set(ENABLE_GLES2_DEFAULT OFF)
-set(USE_OPENGL_OR_ES_DEFAULT OFF)
-
 if (OPENGLES2_FOUND AND (NOT OPENGL_FOUND OR WTF_CPU_ARM OR WTF_CPU_ARM64))
     set(ENABLE_GLES2_DEFAULT ON)
+else ()
+    set(ENABLE_GLES2_DEFAULT OFF)
 endif ()
 
-if (OPENGL_FOUND OR OPENGLES2_FOUND)
-    set(USE_OPENGL_OR_ES_DEFAULT ON)
-endif ()
-
 # Public options specific to the GTK port. Do not add any options here unless
 # there is a strong reason we should support changing the value of the option,
 # and the option is not relevant to any other WebKit ports.
@@ -76,7 +70,7 @@
 WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notification implementation." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON)
-WEBKIT_OPTION_DEFINE(USE_OPENGL_OR_ES "Whether to use OpenGL or ES." PUBLIC ${USE_OPENGL_OR_ES_DEFAULT})
+WEBKIT_OPTION_DEFINE(USE_OPENGL_OR_ES "Whether to use OpenGL or ES." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC OFF)
 WEBKIT_OPTION_DEFINE(USE_SYSTEMD "Whether to enable journald logging" PUBLIC ON)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to