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>
(cherry picked from commit 50238bddf0e95169007cb90479cca86849a19007)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121635
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 71efed9..b9e93d6 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -86,8 +86,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 75aea4d..10306ac 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -350,6 +350,7 @@

    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 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 ad81916..0df3b9b 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -72,6 +72,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 c4a516c..9fccb99 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -211,6 +211,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