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 /canvas/source | |
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 'canvas/source')
-rw-r--r-- | canvas/source/opengl/ogl_spritecanvas.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/canvas/source/opengl/ogl_spritecanvas.cxx b/canvas/source/opengl/ogl_spritecanvas.cxx index de5caf716778..d55625b47668 100644 --- a/canvas/source/opengl/ogl_spritecanvas.cxx +++ b/canvas/source/opengl/ogl_spritecanvas.cxx @@ -14,6 +14,7 @@ #include <osl/mutex.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> +#include <vcl/opengl/OpenGLHelper.hxx> #include "ogl_canvascustomsprite.hxx" #include "ogl_spritecanvas.hxx" @@ -154,6 +155,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* com_sun_star_comp_rendering_SpriteCanvas_OGL_get_implementation( css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& args) { + if( !OpenGLHelper::supportsOpenGL()) + return nullptr; auto p = new oglcanvas::SpriteCanvas(args, context); cppu::acquire(p); p->initialize(); |