diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-12-08 10:44:52 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-12-09 11:46:47 +0100 |
commit | 16e93759134a05a52ef218c4a5ce0f3ea67b0221 (patch) | |
tree | cdf9b1122ace6ccd6a12a3edeeb629f70e29eb3a /include/vcl | |
parent | 8d6c51bc9ca9663b4a9328024d2a3fcf07677ba4 (diff) |
remove isVCLOpenGLEnabled() settings, add DisableOpenGL option
The VCL OpenGL backend code has been removed, so the settings
for it no longer make sense.
But there's still the code for detecting if OpenGL is broken,
and that one makes sense to keep. It turns out other OpenGL code
(such as slideshows) doesn't even use that, so turn this into
a new DisableOpenGL option, make OpenGL-related failsafe code
set and use that, and OpenGL code should use
OpenGLHelper::supportsOpenGL() to make sure OpenGL use is not blocked.
Change-Id: Iec83f204e89bfb0b6eea13be77da8f0f4727a074
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107398
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/opengl/OpenGLHelper.hxx | 13 | ||||
-rw-r--r-- | include/vcl/opengl/OpenGLWrapper.hxx | 7 |
2 files changed, 4 insertions, 16 deletions
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx index f4742d268b49..a0e2d8436564 100644 --- a/include/vcl/opengl/OpenGLHelper.hxx +++ b/include/vcl/opengl/OpenGLHelper.hxx @@ -21,7 +21,7 @@ /// Helper to do a SAL_INFO as well as a GL log. #define VCL_GL_INFO(stream) \ do { \ - if (SAL_DETAIL_ENABLE_LOG_INFO && OpenGLHelper::isVCLOpenGLEnabled()) \ + if (SAL_DETAIL_ENABLE_LOG_INFO) \ { \ ::std::ostringstream detail_stream; \ detail_stream << stream; \ @@ -32,7 +32,7 @@ /// Helper to do a SAL_WARN as well as a GL log. #define VCL_GL_WARN(stream) \ do { \ - if (SAL_DETAIL_ENABLE_LOG_INFO && OpenGLHelper::isVCLOpenGLEnabled()) \ + if (SAL_DETAIL_ENABLE_LOG_INFO) \ { \ ::std::ostringstream detail_stream; \ detail_stream << stream; \ @@ -105,14 +105,9 @@ public: static bool isDeviceDenylisted(); /** - * checks if the system supports all features that are necessary for the OpenGL VCL support + * checks if the system supports all features that are necessary for the OpenGL support */ - static bool supportsVCLOpenGL(); - - /** - * Returns true if VCL has OpenGL rendering enabled - */ - static bool isVCLOpenGLEnabled(); + static bool supportsOpenGL(); }; #ifdef SAL_LOG_WARN diff --git a/include/vcl/opengl/OpenGLWrapper.hxx b/include/vcl/opengl/OpenGLWrapper.hxx index 23237804e79b..3711b3fd4ba2 100644 --- a/include/vcl/opengl/OpenGLWrapper.hxx +++ b/include/vcl/opengl/OpenGLWrapper.hxx @@ -20,18 +20,11 @@ struct VCL_DLLPUBLIC OpenGLWrapper { OpenGLWrapper() = delete; // Should not be instantiated - /** - * Returns true if VCL has OpenGL rendering enabled - */ #if HAVE_FEATURE_UI - static bool isVCLOpenGLEnabled(); - /** * Returns the number of times OpenGL buffers have been swapped. */ static sal_Int64 getBufferSwapCounter(); -#else - static bool isVCLOpenGLEnabled() { return false; } #endif }; |