summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-09-04 12:25:09 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-09-04 15:34:16 +0200
commit50238bddf0e95169007cb90479cca86849a19007 (patch)
tree9d48582fb1d2ffbb98d9bc290462d8ccc11a78e4 /vcl
parent55c676623310ab8a44e426186f4339f6efd118dd (diff)
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>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpinst.cxx2
-rw-r--r--vcl/inc/salinst.hxx3
-rw-r--r--vcl/osx/salinst.cxx1
-rw-r--r--vcl/qt5/Qt5Instance.cxx4
-rw-r--r--vcl/unx/generic/app/salinst.cxx1
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx1
-rw-r--r--vcl/win/app/salinst.cxx1
7 files changed, 8 insertions, 5 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 55bc15325fda..b573f756f411 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -103,8 +103,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 057dbf8d605a..647cbc65927e 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -357,6 +357,7 @@ AquaSalInstance::AquaSalInstance()
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 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 df68e76337ad..54d20d2a8e7a 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -74,6 +74,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 1790537725cf..e6620def5f3d 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -212,6 +212,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