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 <glogow@fbihome.de>
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 55bc153..b573f75 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -103,8 +103,6 @@
#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 1c61dc0..9694d30 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -80,7 +80,7 @@
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 @@
// 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 057dbf8d..647cbc6 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -357,6 +357,7 @@
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mxToolkitName = OUString("osx");
m_bSupportsOpenGL = true;
#if HAVE_FEATURE_SKIA
AquaSkiaSalGraphicsImpl::prepareSkia();
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index f1e34d2..c1e82aa 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -246,8 +246,8 @@
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 df68e76..54d20d2 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -74,6 +74,7 @@
{
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 1790537..e6620de 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -212,6 +212,7 @@
, 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 f2981bb..dd35317 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -384,6 +384,7 @@
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mxToolkitName = OUString("win");
m_bSupportsOpenGL = true;
#if HAVE_FEATURE_SKIA
WinSkiaSalGraphicsImpl::prepareSkia();
#if SKIA_USE_BITMAP32