vcl/headless/svpinst.cxx | 2 -- vcl/inc/salinst.hxx | 3 ++- vcl/osx/salinst.cxx | 1 + vcl/qt5/Qt5Instance.cxx | 4 ++-- vcl/unx/generic/app/salinst.cxx | 1 + vcl/unx/gtk3/gtkinst.cxx | 1 + vcl/win/app/salinst.cxx | 1 + 7 files changed, 8 insertions(+), 5 deletions(-)
New commits: commit 824433168363b7e969c9adca6b636e016a66edb2 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Sat Sep 4 12:25:09 2021 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Sep 6 07:33:06 2021 +0200 tdf#144289 invert / disable default OpenGL support ... and as a result drop setting a default in SalSvpInstance. This is also more consistent: now you must explicitly implement CreateOpenGLContext() and set "m_bSupportsOpenGL = true". Change-Id: I591580bf134907213b8308e0843c278d2f470ed3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121632 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> (cherry picked from commit 50238bddf0e95169007cb90479cca86849a19007) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121635 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 71efed967af3..b9e93d6782c7 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -86,8 +86,6 @@ SvpSalInstance::SvpSalInstance( std::unique_ptr<SalYieldMutex> pMutex ) #if !defined(ANDROID) && !defined(IOS) pthread_atfork(nullptr, nullptr, atfork_child); #endif - - m_bSupportsOpenGL = false; } SvpSalInstance::~SvpSalInstance() diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 1c61dc029cc6..9694d30f4939 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -80,7 +80,7 @@ private: protected: bool m_bSupportsBitmap32 = false; - bool m_bSupportsOpenGL = true; + bool m_bSupportsOpenGL = false; public: SalInstance(std::unique_ptr<comphelper::SolarMutex> pMutex); @@ -158,6 +158,7 @@ public: // may return NULL to disable session management, only used by X11 backend virtual std::unique_ptr<SalSession> CreateSalSession(); + // also needs to set m_bSupportsOpenGL = true in your SalInstance implementation! virtual OpenGLContext* CreateOpenGLContext(); virtual weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile); diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 75aea4d5415a..10306ac4c6c3 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -350,6 +350,7 @@ AquaSalInstance::AquaSalInstance() ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mxToolkitName = OUString("osx"); + m_bSupportsOpenGL = true; } AquaSalInstance::~AquaSalInstance() diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index f1e34d2761b1..c1e82aa6a0d9 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -246,8 +246,8 @@ Qt5Instance::Qt5Instance(std::unique_ptr<QApplication>& pQApp, bool bUseCairo) connect(QGuiApplication::inputMethod(), &QInputMethod::localeChanged, this, &Qt5Instance::localeChanged); -#ifdef EMSCRIPTEN - m_bSupportsOpenGL = false; +#ifndef EMSCRIPTEN + m_bSupportsOpenGL = true; #endif } diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index ad81916a5894..0df3b9b5c0e5 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -72,6 +72,7 @@ X11SalInstance::X11SalInstance(std::unique_ptr<SalYieldMutex> pMutex) { ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mxToolkitName = OUString("x11"); + m_bSupportsOpenGL = true; #if HAVE_FEATURE_SKIA X11SkiaSalGraphicsImpl::prepareSkia(); #if SKIA_USE_BITMAP32 diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index c4a516ca5d41..9fccb99779b6 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -211,6 +211,7 @@ GtkInstance::GtkInstance( std::unique_ptr<SalYieldMutex> pMutex ) , bNeedsInit(true) , m_pLastCairoFontOptions(nullptr) { + m_bSupportsOpenGL = true; } //We want to defer initializing gtk until we are after uno has been diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index f2981bbd9d1c..dd35317040d4 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -384,6 +384,7 @@ WinSalInstance::WinSalInstance() { ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mxToolkitName = OUString("win"); + m_bSupportsOpenGL = true; #if HAVE_FEATURE_SKIA WinSkiaSalGraphicsImpl::prepareSkia(); #if SKIA_USE_BITMAP32