[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/osx vcl/qt5 vcl/unx vcl/win
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 4 13:34:56 UTC 2021
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 50238bddf0e95169007cb90479cca86849a19007
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Sep 4 12:25:09 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sat Sep 4 15:34:16 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 <glogow at fbihome.de>
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
More information about the Libreoffice-commits
mailing list