[Libreoffice-commits] core.git: canvas/source cui/source framework/source include/vcl sc/source sd/qa vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_win.mk vcl/Module_vcl.mk vcl/opengl vcl/Package_opengl_shader.mk vcl/qa vcl/source vcl/unx vcl/win vcl/workben

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 7 19:47:41 UTC 2020


 canvas/source/cairo/cairo_canvas.cxx                   |    2 
 canvas/source/directx/dx_canvas.cxx                    |    2 
 canvas/source/factory/cf_service.cxx                   |    6 
 cui/source/options/optgdlg.cxx                         |   10 
 framework/source/fwe/helper/titlehelper.cxx            |    5 
 include/vcl/opengl/OpenGLContext.hxx                   |   39 
 sc/source/core/data/global.cxx                         |    4 
 sd/qa/unit/export-tests.cxx                            |   12 
 vcl/Library_vcl.mk                                     |   12 
 vcl/Library_vclplug_gen.mk                             |    2 
 vcl/Library_vclplug_win.mk                             |    1 
 vcl/Module_vcl.mk                                      |    1 
 vcl/Package_opengl_shader.mk                           |   41 
 vcl/inc/opengl/BufferObject.hxx                        |   80 
 vcl/inc/opengl/FixedTextureAtlas.hxx                   |   47 
 vcl/inc/opengl/LineRenderUtils.hxx                     |   55 
 vcl/inc/opengl/PackedTextureAtlas.hxx                  |   57 
 vcl/inc/opengl/RenderList.hxx                          |  173 -
 vcl/inc/opengl/RenderState.hxx                         |  188 -
 vcl/inc/opengl/TextureState.hxx                        |   73 
 vcl/inc/opengl/VertexUtils.hxx                         |  118 
 vcl/inc/opengl/framebuffer.hxx                         |   48 
 vcl/inc/opengl/gdiimpl.hxx                             |  396 --
 vcl/inc/opengl/program.hxx                             |  122 
 vcl/inc/opengl/salbmp.hxx                              |  113 
 vcl/inc/opengl/texture.hxx                             |  139 -
 vcl/inc/opengl/win/gdiimpl.hxx                         |   97 
 vcl/inc/opengl/win/winlayout.hxx                       |   51 
 vcl/inc/opengl/x11/cairotextrender.hxx                 |   27 
 vcl/inc/opengl/x11/gdiimpl.hxx                         |   42 
 vcl/inc/opengl/x11/salvd.hxx                           |   57 
 vcl/inc/opengl/zone.hxx                                |   16 
 vcl/inc/salgdi.hxx                                     |    3 
 vcl/inc/unx/salgdi.h                                   |    5 
 vcl/inc/win/saldata.hxx                                |    2 
 vcl/inc/win/salgdi.h                                   |    1 
 vcl/opengl/FixedTextureAtlas.cxx                       |  137 -
 vcl/opengl/LineRenderUtils.cxx                         |  189 -
 vcl/opengl/PackedTextureAtlas.cxx                      |  192 -
 vcl/opengl/RenderList.cxx                              |  404 --
 vcl/opengl/framebuffer.cxx                             |  108 
 vcl/opengl/gdiimpl.cxx                                 | 2321 -----------------
 vcl/opengl/program.cxx                                 |  390 --
 vcl/opengl/salbmp.cxx                                  |  783 -----
 vcl/opengl/scale.cxx                                   |  423 ---
 vcl/opengl/shaders/areaHashCRC64TFragmentShader.glsl   |   87 
 vcl/opengl/shaders/areaScaleFastFragmentShader.glsl    |   59 
 vcl/opengl/shaders/areaScaleFragmentShader.glsl        |  239 -
 vcl/opengl/shaders/blendedTextureFragmentShader.glsl   |   33 
 vcl/opengl/shaders/blendedTextureVertexShader.glsl     |   28 
 vcl/opengl/shaders/combinedFragmentShader.glsl         |   44 
 vcl/opengl/shaders/combinedTextureFragmentShader.glsl  |   73 
 vcl/opengl/shaders/combinedTextureVertexShader.glsl    |   43 
 vcl/opengl/shaders/combinedVertexShader.glsl           |   76 
 vcl/opengl/shaders/convolutionFragmentShader.glsl      |   30 
 vcl/opengl/shaders/diffTextureFragmentShader.glsl      |   30 
 vcl/opengl/shaders/dumbVertexShader.glsl               |   20 
 vcl/opengl/shaders/greyscaleFragmentShader.glsl        |   20 
 vcl/opengl/shaders/invert50FragmentShader.glsl         |   25 
 vcl/opengl/shaders/lineFragmentShader.glsl             |   38 
 vcl/opengl/shaders/lineVertexShader.glsl               |   37 
 vcl/opengl/shaders/linearGradientFragmentShader.glsl   |   23 
 vcl/opengl/shaders/maskFragmentShader.glsl             |   23 
 vcl/opengl/shaders/maskedTextureFragmentShader.glsl    |   27 
 vcl/opengl/shaders/maskedTextureVertexShader.glsl      |   26 
 vcl/opengl/shaders/radialGradientFragmentShader.glsl   |   23 
 vcl/opengl/shaders/replaceColorFragmentShader.glsl     |   25 
 vcl/opengl/shaders/solidFragmentShader.glsl            |   19 
 vcl/opengl/shaders/textureFragmentShader.glsl          |   20 
 vcl/opengl/shaders/textureVertexShader.glsl            |   22 
 vcl/opengl/shaders/transformedTextureVertexShader.glsl |   28 
 vcl/opengl/texture.cxx                                 |  606 ----
 vcl/opengl/win/gdiimpl.cxx                             |  231 -
 vcl/opengl/win/winlayout.cxx                           |   60 
 vcl/opengl/x11/cairotextrender.cxx                     |   84 
 vcl/opengl/x11/gdiimpl.cxx                             |   81 
 vcl/opengl/x11/salvd.cxx                               |   90 
 vcl/qa/cppunit/BitmapTest.cxx                          |   10 
 vcl/qa/cppunit/svm/svmtest.cxx                         |   49 
 vcl/source/app/svapp.cxx                               |    5 
 vcl/source/app/svdata.cxx                              |    7 
 vcl/source/gdi/bitmap3.cxx                             |    4 
 vcl/source/gdi/salgdilayout.cxx                        |   43 
 vcl/source/opengl/OpenGLContext.cxx                    |  311 --
 vcl/source/opengl/OpenGLHelper.cxx                     |   25 
 vcl/source/outdev/bitmap.cxx                           |    5 
 vcl/source/outdev/text.cxx                             |    8 
 vcl/source/window/event.cxx                            |   11 
 vcl/source/window/status.cxx                           |    7 
 vcl/unx/generic/gdi/salbmp.cxx                         |    5 
 vcl/unx/generic/gdi/salgdi.cxx                         |   17 
 vcl/unx/generic/gdi/salvd.cxx                          |    4 
 vcl/unx/generic/window/salframe.cxx                    |    2 
 vcl/win/app/salinst.cxx                                |    6 
 vcl/win/gdi/salfont.cxx                                |   11 
 vcl/win/gdi/salgdi.cxx                                 |    8 
 vcl/win/gdi/salgdi2.cxx                                |   19 
 vcl/win/gdi/salnativewidgets-luna.cxx                  |    2 
 vcl/win/gdi/salvd.cxx                                  |    1 
 vcl/win/gdi/winlayout.cxx                              |    5 
 vcl/workben/vcldemo.cxx                                |  196 -
 101 files changed, 35 insertions(+), 9990 deletions(-)

New commits:
commit db89f53c31af997b9bf422b0e784afba8d62a42e
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Dec 4 12:14:47 2020 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Dec 7 20:46:49 2020 +0100

    remove OpenGL VCL backend code
    
    It is by now practically unmaintained, even bugreports in bugzilla
    have been already closed for it. AFAICT this used to be really
    used only on Windows, where it's no longer the default.
    
    There's still some OpenGL code left, because there are still two
    other places that use OpenGL. One is OpenGL slideshows, which
    reuse some of the base OpenGL code (and I've checked they
    still work even after this removal). Second one is OpenGL canvas,
    which it seems has never been finished or enabled (or so it
    most probably should be dumped too).
    
    Change-Id: I7ea5aef77ec252eb8e712d167db591209be84a13
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107290
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 64c65d4cd904..394ffe773871 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -48,8 +48,6 @@ namespace cairocanvas
         if( !maArguments.hasElements() )
             return;
 
-        // tdf#93870 - force VCL canvas in OpenGL mode for now.
-        assert( !OpenGLWrapper::isVCLOpenGLEnabled() );
         assert( !SkiaHelper::isVCLSkiaEnabled() );
 
         /* maArguments:
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 08ce658249db..a571d4085d6d 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -77,8 +77,6 @@ namespace dxcanvas
         if( maArguments.getLength() == 0 )
             return;
 
-        // tdf#93870 - force VCL canvas in OpenGL mode for now.
-        assert( !OpenGLWrapper::isVCLOpenGLEnabled() );
         assert( !SkiaHelper::isVCLSkiaEnabled() );
 
         SAL_INFO("canvas.directx", "Canvas::initialize called" );
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 9bb75d5e26b0..608aaaf1d0a2 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -299,12 +299,6 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
                      m_bCacheHasForcedLastImpl,
                      "ForceSafeServiceImpl" );
 
-    // tdf#93870 - force VCL canvas in OpenGL mode for now.
-#if HAVE_FEATURE_OPENGL
-    if( OpenGLWrapper::isVCLOpenGLEnabled() )
-        bForceLastEntry = true;
-#endif
-
     // use anti-aliasing canvas, if config flag set (or not existing)
     bool bUseAAEntry(true);
     checkConfigFlag( bUseAAEntry,
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 07435990a234..a1b820b93585 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -78,9 +78,6 @@
 #include <vcl/settings.hxx>
 #include <vcl/window.hxx>
 #include <vcl/IconThemeInfo.hxx>
-#if HAVE_FEATURE_OPENGL
-#include <vcl/opengl/OpenGLWrapper.hxx>
-#endif
 #include <vcl/skia/SkiaHelper.hxx>
 #include "optgdlg.hxx"
 #include <svtools/apearcfg.hxx>
@@ -467,13 +464,6 @@ CanvasSettings::CanvasSettings() :
 
 bool CanvasSettings::IsHardwareAccelerationAvailable() const
 {
-#if HAVE_FEATURE_OPENGL
-    if (OpenGLWrapper::isVCLOpenGLEnabled() && Application::GetToolkitName() != "gtk3")
-    {
-        mbHWAccelAvailable = false;
-        return false;
-    }
-#endif
     if( !mbHWAccelChecked )
     {
         mbHWAccelChecked = true;
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index fba89ae42bfc..5936d9133ff3 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -37,7 +37,6 @@
 #include <rtl/ustrbuf.hxx>
 #include <osl/mutex.hxx>
 #include <tools/urlobj.hxx>
-#include <vcl/opengl/OpenGLWrapper.hxx>
 #include <vcl/skia/SkiaHelper.hxx>
 #include <vcl/svapp.hxx>
 
@@ -600,10 +599,6 @@ void TitleHelper::impl_appendDebugVersion (OUStringBuffer& sTitle)
     OUString sVersion = ::utl::Bootstrap::getBuildIdData("development");
     sTitle.append(" [");
     sTitle.append(sVersion);
-#if HAVE_FEATURE_UI
-    if (OpenGLWrapper::isVCLOpenGLEnabled() && !SkiaHelper::isVCLSkiaEnabled())
-        sTitle.append("-GL");
-#endif
     sTitle.append("]");
 }
 #else
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index c6807a6fe863..28884945a3a8 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -19,11 +19,6 @@
 #include <memory>
 #include <unordered_map>
 
-class OpenGLFramebuffer;
-class OpenGLProgram;
-class OpenGLTexture;
-class RenderState;
-
 /// Holds the information of our new child window
 struct VCL_DLLPUBLIC GLWindow
 {
@@ -72,25 +67,12 @@ public:
 
     // use these methods right after setting a context to make sure drawing happens
     // in the right FBO (default one is for onscreen painting)
-    void               BindFramebuffer( OpenGLFramebuffer* pFramebuffer );
     void               AcquireDefaultFramebuffer();
-    OpenGLFramebuffer* AcquireFramebuffer( const OpenGLTexture& rTexture );
-    static void        ReleaseFramebuffer( OpenGLFramebuffer* pFramebuffer );
     void UnbindTextureFromFramebuffers( GLuint nTexture );
     static bool        IsTextureAttachedAnywhere( GLuint nTexture );
 
-    void               ReleaseFramebuffer( const OpenGLTexture& rTexture );
     void               ReleaseFramebuffers();
 
-    // retrieve a program from the cache or compile/link it
-    OpenGLProgram*      GetProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" );
-    OpenGLProgram*      UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" );
-
-    RenderState& state()
-    {
-        return *mpRenderState;
-    }
-
     OpenGLCapabilitySwitch& getOpenGLCapabilitySwitch()
     {
         return maOpenGLCapabilitySwitch;
@@ -107,10 +89,6 @@ public:
     /// Is there a current GL context ?
     static bool hasCurrent();
 
-    /// make a VCL context (any context) current, create it if necessary.
-    static void makeVCLCurrent();
-    /// fetch any VCL context, creating one if bMakeIfNecessary is set.
-    static rtl::Reference<OpenGLContext> getVCLContext(bool bMakeIfNecessary = true);
     /// make this GL context current - so it is implicit in subsequent GL calls
     virtual void makeCurrent();
     /// Put this GL context to the end of the context list.
@@ -134,10 +112,6 @@ public:
         return mbInitialized;
     }
 
-    /// VCL promiscuously re-uses its own contexts:
-    void setVCLOnly() { mbVCLOnly = true; }
-    bool isVCLOnly() const { return mbVCLOnly; }
-
     virtual SystemWindowData generateWinData(vcl::Window* pParent, bool bRequestLegacyContext);
 
 private:
@@ -159,22 +133,9 @@ protected:
     bool mbInitialized;
     int  mnRefCount;
     bool mbRequestLegacyContext;
-    bool mbVCLOnly;
-
-    int mnFramebufferCount;
-    OpenGLFramebuffer* mpCurrentFramebuffer;
-    OpenGLFramebuffer* mpFirstFramebuffer;
-    OpenGLFramebuffer* mpLastFramebuffer;
 
     OpenGLCapabilitySwitch maOpenGLCapabilitySwitch;
 
-private:
-    typedef std::unordered_map< OString, std::shared_ptr<OpenGLProgram> > ProgramCollection;
-    ProgramCollection maPrograms;
-    OpenGLProgram* mpCurrentProgram;
-
-    std::unique_ptr<RenderState> mpRenderState;
-
 public:
     vcl::Region maClipRegion;
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 221e1d31eb50..eb7476801f99 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -51,7 +51,6 @@
 #include <unotools/transliterationwrapper.hxx>
 
 #include <comphelper/lok.hxx>
-#include <vcl/opengl/OpenGLWrapper.hxx>
 
 #include <global.hxx>
 #include <scresid.hxx>
@@ -460,10 +459,9 @@ void ScGlobal::InitPPT()
 {
     OutputDevice* pDev = Application::GetDefaultDevice();
 
-    if (comphelper::LibreOfficeKit::isActive() || OpenGLWrapper::isVCLOpenGLEnabled())
+    if (comphelper::LibreOfficeKit::isActive())
     {
         // LOK: the below limited precision is not enough for RowColumnHeader.
-        // OpenGL: limited precision breaks AA of text in charts.
         nScreenPPTX = double(pDev->GetDPIX()) / double(TWIPS_PER_INCH);
         nScreenPPTY = double(pDev->GetDPIY()) / double(TWIPS_PER_INCH);
     }
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index cb496b6a2c83..69eb33240764 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -20,11 +20,6 @@
 #include <unotools/mediadescriptor.hxx>
 #include <rtl/ustring.hxx>
 
-#ifdef _WIN32
-#include <vcl/opengl/OpenGLWrapper.hxx>
-#include <vcl/skia/SkiaHelper.hxx>
-#endif
-
 #include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -295,13 +290,6 @@ void SdExportTest::testTransparentBackground()
 
 void SdExportTest::testMediaEmbedding()
 {
-#ifdef _WIN32
-    // This seems broken. This test should not be disabled for all cases except when OpenGL
-    // is found to be working, just because in some OpenGL setups this breaks (per the commit log message).
-    if (!OpenGLWrapper::isVCLOpenGLEnabled() && !SkiaHelper::isVCLSkiaEnabled())
-        return;
-#endif
-
     ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/media_embedding.odp"), ODP);
 
     const SdrPage *pPage = GetPage( 1, xDocShRef );
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 8f9608d2ca2c..efddab108293 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -592,16 +592,6 @@ else # ! DISABLE_GUI
 
 $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/opengl/DeviceInfo \
-    vcl/opengl/gdiimpl \
-    vcl/opengl/salbmp \
-    vcl/opengl/scale \
-    vcl/opengl/framebuffer \
-    vcl/opengl/program \
-    vcl/opengl/texture \
-    vcl/opengl/FixedTextureAtlas \
-    vcl/opengl/PackedTextureAtlas \
-    vcl/opengl/RenderList \
-    vcl/opengl/LineRenderUtils \
     vcl/source/opengl/OpenGLContext \
     vcl/source/opengl/OpenGLHelper \
     vcl/skia/SkiaHelper \
@@ -612,8 +602,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
         ) \
  ))
 
-# runtime dependency
-$(eval $(call gb_Library_use_package,vcl,vcl_opengl_shader))
 ifeq ($(OS),WNT)
 $(eval $(call gb_Library_use_package,vcl,vcl_opengl_denylist))
 endif
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 36652b70159c..f4cbaf715661 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -108,9 +108,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
     vcl/unx/generic/window/salobj \
     vcl/unx/x11/x11sys \
     vcl/unx/x11/xlimits \
-    vcl/opengl/x11/cairotextrender \
     vcl/opengl/x11/gdiimpl \
-    vcl/opengl/x11/salvd \
     $(if $(filter SKIA,$(BUILD_TYPE)), \
         vcl/skia/x11/gdiimpl \
         vcl/skia/x11/salvd \
diff --git a/vcl/Library_vclplug_win.mk b/vcl/Library_vclplug_win.mk
index ee456743d8f6..9957c562df73 100644
--- a/vcl/Library_vclplug_win.mk
+++ b/vcl/Library_vclplug_win.mk
@@ -65,7 +65,6 @@ $(eval $(call gb_Library_use_externals,vclplug_win,\
 
 $(eval $(call gb_Library_add_exception_objects,vclplug_win,\
     vcl/opengl/win/gdiimpl \
-    vcl/opengl/win/winlayout \
     vcl/win/app/saldata \
     vcl/win/app/salinfo \
     vcl/win/app/salinst \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 05fe05b8b4bf..8bfc67c1e2ef 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_Module_Module,vcl))
 
 $(eval $(call gb_Module_add_targets,vcl,\
     Library_vcl \
-    Package_opengl_shader \
     Package_theme_definitions \
     Package_tipoftheday \
     Package_toolbarmode \
diff --git a/vcl/Package_opengl_shader.mk b/vcl/Package_opengl_shader.mk
deleted file mode 100644
index 15e3bee1da1a..000000000000
--- a/vcl/Package_opengl_shader.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Package_Package,vcl_opengl_shader,$(SRCDIR)/vcl/opengl/shaders))
-
-$(eval $(call gb_Package_add_files,vcl_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
-    areaHashCRC64TFragmentShader.glsl \
-    areaScaleFastFragmentShader.glsl \
-    areaScaleFragmentShader.glsl \
-    blendedTextureFragmentShader.glsl \
-    blendedTextureVertexShader.glsl \
-    dumbVertexShader.glsl \
-    diffTextureFragmentShader.glsl \
-    greyscaleFragmentShader.glsl \
-    invert50FragmentShader.glsl \
-    convolutionFragmentShader.glsl \
-    linearGradientFragmentShader.glsl \
-    combinedTextureFragmentShader.glsl \
-    combinedTextureVertexShader.glsl \
-    combinedFragmentShader.glsl \
-    combinedVertexShader.glsl \
-    lineFragmentShader.glsl \
-    lineVertexShader.glsl \
-    maskFragmentShader.glsl \
-    maskedTextureVertexShader.glsl \
-    maskedTextureFragmentShader.glsl \
-    radialGradientFragmentShader.glsl \
-    replaceColorFragmentShader.glsl \
-    solidFragmentShader.glsl \
-    textureFragmentShader.glsl \
-    textureVertexShader.glsl \
-    transformedTextureVertexShader.glsl \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/vcl/inc/opengl/BufferObject.hxx b/vcl/inc/opengl/BufferObject.hxx
deleted file mode 100644
index e31148b74c6e..000000000000
--- a/vcl/inc/opengl/BufferObject.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_BUFFEROBJECT_H
-#define INCLUDED_VCL_INC_OPENGL_BUFFEROBJECT_H
-
-namespace vcl
-{
-template <typename TYPE, GLenum BUFFER_TYPE> class BufferObject
-{
-private:
-    GLuint mId;
-
-public:
-    BufferObject()
-        : mId(0)
-    {
-        glGenBuffers(1, &mId);
-        CHECK_GL_ERROR();
-    }
-
-    virtual ~BufferObject()
-    {
-        if (mId)
-        {
-            glDeleteBuffers(1, &mId);
-            CHECK_GL_ERROR();
-            mId = 0;
-        }
-    }
-
-    void bind()
-    {
-        if (mId)
-        {
-            glBindBuffer(BUFFER_TYPE, mId);
-            CHECK_GL_ERROR();
-        }
-    }
-
-    void unbind()
-    {
-        if (mId)
-        {
-            glBindBuffer(BUFFER_TYPE, 0);
-            CHECK_GL_ERROR();
-        }
-    }
-
-    void upload(const std::vector<TYPE>& rData)
-    {
-        if (mId)
-        {
-            bind();
-            glBufferData(BUFFER_TYPE, sizeof(TYPE) * rData.size(), rData.data(), GL_STATIC_DRAW);
-            CHECK_GL_ERROR();
-        }
-    }
-};
-
-template <typename TYPE> class VertexBufferObject final : public BufferObject<TYPE, GL_ARRAY_BUFFER>
-{
-};
-
-class IndexBufferObject final : public BufferObject<GLuint, GL_ELEMENT_ARRAY_BUFFER>
-{
-};
-
-} // end vcl
-
-#endif // INCLUDED_VCL_INC_OPENGL_BUFFEROBJECT_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/FixedTextureAtlas.hxx b/vcl/inc/opengl/FixedTextureAtlas.hxx
deleted file mode 100644
index e576fcb54f0b..000000000000
--- a/vcl/inc/opengl/FixedTextureAtlas.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_FIXEDTEXTUREATLAS_HXX
-#define INCLUDED_VCL_INC_OPENGL_FIXEDTEXTUREATLAS_HXX
-
-#include <memory>
-#include <opengl/texture.hxx>
-
-struct FixedTexture;
-
-class FixedTextureAtlasManager final
-{
-    std::vector<std::unique_ptr<FixedTexture>> maFixedTextures;
-
-    int mWidthFactor;
-    int mHeightFactor;
-    int mSubTextureSize;
-
-    void CreateNewTexture();
-
-    FixedTextureAtlasManager( const FixedTextureAtlasManager& ) = delete;
-    FixedTextureAtlasManager& operator=( const FixedTextureAtlasManager& ) = delete;
-
-public:
-    FixedTextureAtlasManager(int nWidthFactor, int nHeightFactor, int nTextureSize);
-    ~FixedTextureAtlasManager();
-
-    OpenGLTexture InsertBuffer(int nWidth, int nHeight, int nFormat, int nType, sal_uInt8 const * pData);
-    OpenGLTexture Reserve(int nWidth, int nHeight);
-
-    int GetSubtextureSize() const
-    {
-        return mSubTextureSize;
-    }
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_FIXEDTEXTUREATLAS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/LineRenderUtils.hxx b/vcl/inc/opengl/LineRenderUtils.hxx
deleted file mode 100644
index 8d97fa3ee9dc..000000000000
--- a/vcl/inc/opengl/LineRenderUtils.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
-#define INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
-
-#include <opengl/RenderList.hxx>
-
-namespace vcl
-{
-class LineBuilder
-{
-private:
-    std::vector<Vertex>& mrVertices;
-    std::vector<GLuint>& mrIndices;
-    GLubyte mR, mG, mB, mA;
-    GLfloat mfLineWidth;
-    GLfloat mfLineWidthAndAA;
-    size_t mnInitialIndexSize;
-    bool mbIncomplete;
-
-public:
-    LineBuilder(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
-                Color nColor, GLfloat fTransparency,
-                GLfloat fLineWidth, bool bUseAA);
-
-    void appendLineSegment(const glm::vec2& rPoint1, const glm::vec2& rNormal1, GLfloat aExtrusion1,
-                           const glm::vec2& rPoint2, const glm::vec2& rNormal2, GLfloat aExtrusion2);
-
-    void appendLine(const glm::vec2& rPoint1, const glm::vec2& rPoint2);
-
-    void appendAndConnectLinePoint(const glm::vec2& rPoint, const glm::vec2& aNormal, GLfloat aExtrusion);
-
-    void appendMiterJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
-                          glm::vec2 const& nextLineVector);
-    void appendBevelJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
-                          const glm::vec2& nextLineVector);
-    void appendRoundJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
-                          const glm::vec2& nextLineVector);
-    void appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2);
-    void appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2);
-};
-
-} // end vcl
-
-#endif // INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/PackedTextureAtlas.hxx b/vcl/inc/opengl/PackedTextureAtlas.hxx
deleted file mode 100644
index 7a283aa4517b..000000000000
--- a/vcl/inc/opengl/PackedTextureAtlas.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_PACKEDTEXTUREATLAS_HXX
-#define INCLUDED_VCL_INC_OPENGL_PACKEDTEXTUREATLAS_HXX
-
-#include <memory>
-#include <opengl/texture.hxx>
-
-struct PackedTexture;
-
-/**
- * Pack textures into one texture atlas.
- *
- * This is based on algorithm described in [1] and is an
- * adaptation of "texture atlas generator" from [2].
- *
- * [1]: http://www.blackpawn.com/texts/lightmaps/
- * [2]: https://github.com/lukaszdk/texture-atlas-generator
- *
- */
-class VCL_DLLPUBLIC PackedTextureAtlasManager final
-{
-    std::vector<std::unique_ptr<PackedTexture>> maPackedTextures;
-
-    int mnTextureWidth;
-    int mnTextureHeight;
-
-    void CreateNewTexture();
-
-    PackedTextureAtlasManager( const PackedTextureAtlasManager& ) = delete;
-    PackedTextureAtlasManager& operator=( const PackedTextureAtlasManager& ) = delete;
-
-public:
-
-    /**
-     * nTextureWidth and nTextureHeight are the dimensions of the common texture(s)
-     * nTextureLimit is the maximum limit of that a texture atlas can have (0 or less - unlimited)
-     */
-    PackedTextureAtlasManager(int nTextureWidth, int nTextureHeight);
-    ~PackedTextureAtlasManager();
-
-    OpenGLTexture InsertBuffer(int nWidth, int nHeight, int nFormat, int nType, sal_uInt8 const * pData);
-    OpenGLTexture Reserve(int nWidth, int nHeight);
-    std::vector<GLuint> ReduceTextureNumber(int nMaxNumberOfTextures);
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_PACKEDTEXTUREATLAS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx
deleted file mode 100644
index 236fa570aec1..000000000000
--- a/vcl/inc/opengl/RenderList.hxx
+++ /dev/null
@@ -1,173 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_RENDERLIST_H
-#define INCLUDED_VCL_INC_OPENGL_RENDERLIST_H
-
-#include <unordered_map>
-
-#include <glm/glm.hpp>
-
-#include <vcl/salgtype.hxx>
-#include <basegfx/range/b2drange.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-
-#include <opengl/texture.hxx>
-
-#include <com/sun/star/drawing/LineCap.hpp>
-
-struct Vertex
-{
-    glm::vec2 position;
-    glm::vec4 color;
-    glm::vec4 lineData;
-};
-
-static_assert(sizeof(Vertex) == (2*4 + 4*4 + 4*4), "Vertex struct has wrong size/alignment");
-
-
-struct RenderParameters
-{
-    std::vector<Vertex> maVertices;
-    std::vector<GLuint> maIndices;
-};
-
-struct RenderTextureParameters
-{
-    std::vector<GLfloat>   maVertices;
-    std::vector<GLfloat>   maTextureCoords;
-    std::vector<GLubyte>   maColors;
-    OpenGLTexture          maTexture;
-};
-
-struct RenderEntry
-{
-    basegfx::B2DRange maOverlapTrackingRectangle;
-
-    RenderParameters maTriangleParameters;
-    RenderParameters maLineParameters;
-
-    std::unordered_map<GLuint, RenderTextureParameters> maTextureParametersMap;
-
-    bool hasTriangles() const
-    {
-        return !maTriangleParameters.maVertices.empty();
-    }
-
-    bool hasLines() const
-    {
-        return !maLineParameters.maVertices.empty();
-    }
-
-    bool hasTextures() const
-    {
-        return !maTextureParametersMap.empty();
-    }
-};
-
-class RenderList
-{
-private:
-    std::vector<RenderEntry> maRenderEntries;
-    std::vector<basegfx::B2DRange> maRectangles;
-
-    bool doesOverlap(const basegfx::B2DRange& rDrawRectangle)
-    {
-        if (!maRenderEntries.back().maOverlapTrackingRectangle.overlaps(rDrawRectangle))
-            return false;
-
-        for (const basegfx::B2DRange& rRectangle : maRectangles)
-        {
-            if (rRectangle.overlaps(rDrawRectangle))
-                return true;
-        }
-        return false;
-    }
-
-    void checkOverlapping(const basegfx::B2DRange& rDrawRectangle)
-    {
-        if (maRenderEntries.empty() || doesOverlap(rDrawRectangle))
-        {
-            maRenderEntries.emplace_back();
-            maRenderEntries.back().maOverlapTrackingRectangle = rDrawRectangle;
-
-            maRectangles.clear();
-            maRectangles.reserve(30);
-            maRectangles.push_back(rDrawRectangle);
-        }
-        else
-        {
-            maRenderEntries.back().maOverlapTrackingRectangle.expand(rDrawRectangle);
-
-            if (maRectangles.size() < 30)
-            {
-                maRectangles.push_back(rDrawRectangle);
-            }
-            else
-            {
-                basegfx::B2DRange aTempRectangle(maRectangles[0]);
-                aTempRectangle.expand(rDrawRectangle);
-                double minArea = aTempRectangle.getWidth() * aTempRectangle.getHeight();
-                size_t index = 0;
-
-                double area;
-                for (size_t i = 1; i < maRectangles.size(); ++i)
-                {
-                    aTempRectangle = maRectangles[i];
-                    aTempRectangle.expand(rDrawRectangle);
-                    area = aTempRectangle.getWidth() * aTempRectangle.getHeight();
-                    if (area < minArea)
-                        index = i;
-                }
-                maRectangles[index].expand(rDrawRectangle);
-            }
-        }
-    }
-
-public:
-
-    RenderList() = default;
-
-    bool empty()
-    {
-        return maRenderEntries.empty();
-    }
-
-    void clear()
-    {
-        maRenderEntries.clear();
-    }
-
-    std::vector<RenderEntry>& getEntries()
-    {
-        return maRenderEntries;
-    }
-
-    VCL_DLLPUBLIC void addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, Color nColor, const SalTwoRect& r2Rect);
-
-    void addDrawPixel(tools::Long nX, tools::Long nY, Color nColor);
-
-    void addDrawRectangle(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, double fTransparency,
-                          Color nLineColor, Color nFillColor);
-
-    void addDrawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, Color nLineColor, bool bUseAA);
-
-    void addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency,
-                            Color nLineColor, Color nFillColor, bool bUseAA);
-
-    void addDrawPolyLine(const basegfx::B2DPolygon& rPolygon, double fTransparency,
-                         double fLineWidth, basegfx::B2DLineJoin eLineJoin,
-                         css::drawing::LineCap eLineCap, double fMiterMinimumAngle,
-                         Color nLineColor, bool bUseAA);
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_RENDERLIST_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/RenderState.hxx b/vcl/inc/opengl/RenderState.hxx
deleted file mode 100644
index 3a89344e2e0e..000000000000
--- a/vcl/inc/opengl/RenderState.hxx
+++ /dev/null
@@ -1,188 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_RENDER_STATE_H
-#define INCLUDED_VCL_INC_OPENGL_RENDER_STATE_H
-
-#include <opengl/TextureState.hxx>
-
-template<GLenum ENUM_TYPE, typename TYPE>
-class GenericCapabilityState
-{
-protected:
-    bool mbTest;
-
-    GenericCapabilityState()
-        : mbTest(false)
-    {
-    }
-
-    static bool readState()
-    {
-        return glIsEnabled(ENUM_TYPE);
-    }
-
-public:
-    void sync()
-    {
-        mbTest = readState();
-    }
-
-    void enable()
-    {
-        if (!mbTest)
-        {
-            glEnable(ENUM_TYPE);
-            CHECK_GL_ERROR();
-            mbTest = true;
-        }
-        else
-        {
-            VCL_GL_INFO(TYPE::className() << ": enable called but already enabled");
-        }
-#ifdef DBG_UTIL
-        checkState();
-#endif
-    }
-
-    void disable()
-    {
-        if (mbTest)
-        {
-            glDisable(ENUM_TYPE);
-            CHECK_GL_ERROR();
-            mbTest = false;
-        }
-        else
-        {
-            VCL_GL_INFO(TYPE::className() << ": disable called but already disabled");
-        }
-#ifdef DBG_UTIL
-        checkState();
-#endif
-    }
-
-#ifdef DBG_UTIL
-    void checkState()
-    {
-        bool bRealState = readState();
-        if (mbTest != bRealState)
-        {
-            VCL_GL_INFO(TYPE::className() << " mismatch! "
-                            << "Expected: " << (mbTest ? "enabled" : "disabled")
-                            << " but is: "        << (bRealState ? "enabled" : "disabled"));
-        }
-    }
-#endif
-};
-
-class ScissorState : public GenericCapabilityState<GL_SCISSOR_TEST, ScissorState>
-{
-private:
-    int mX;
-    int mY;
-    int mWidth;
-    int mHeight;
-
-public:
-    static std::string className() { return std::string("ScissorState"); }
-
-    ScissorState()
-        : mX(0)
-        , mY(0)
-        , mWidth(0)
-        , mHeight(0)
-    {}
-
-    void set(int x, int y, int width, int height)
-    {
-        if (x != mX || y != mY || width != mWidth || height != mHeight)
-        {
-            glScissor(x, y, width, height);
-            CHECK_GL_ERROR();
-
-            mX = x;
-            mY = y;
-            mWidth = width;
-            mHeight = height;
-        }
-    }
-};
-
-class StencilState : public GenericCapabilityState<GL_STENCIL_TEST, StencilState>
-{
-public:
-    static std::string className() { return std::string("StencilState"); }
-};
-
-class BlendState : public GenericCapabilityState<GL_BLEND, BlendState>
-{
-    GLenum mnSourceMode;
-    GLenum mnDestinationMode;
-public:
-    BlendState()
-        : mnSourceMode(GL_ZERO)
-        , mnDestinationMode(GL_ZERO)
-    {}
-
-    static std::string className() { return std::string("BlendState"); }
-
-    void func(GLenum nSource, GLenum nDestination)
-    {
-        if (mnSourceMode != nSource || mnDestinationMode != nDestination)
-        {
-            glBlendFunc(nSource, nDestination);
-            CHECK_GL_ERROR();
-            mnSourceMode = nSource;
-            mnDestinationMode = nDestination;
-        }
-    }
-};
-
-class RenderState
-{
-    TextureState maTexture;
-    ScissorState maScissor;
-    StencilState maStencil;
-    BlendState   maBlend;
-
-    tools::Rectangle maCurrentViewport;
-
-public:
-    RenderState()
-    {}
-
-    void viewport(tools::Rectangle aViewPort)
-    {
-        if (aViewPort != maCurrentViewport)
-        {
-            glViewport(aViewPort.Left(), aViewPort.Top(), aViewPort.GetWidth(), aViewPort.GetHeight());
-            CHECK_GL_ERROR();
-            maCurrentViewport = aViewPort;
-        }
-    }
-
-    TextureState& texture() { return maTexture; }
-    ScissorState& scissor() { return maScissor; }
-    StencilState& stencil() { return maStencil; }
-    BlendState&   blend()   { return maBlend; }
-
-    void sync()
-    {
-        VCL_GL_INFO("RenderState::sync");
-        maScissor.sync();
-        maStencil.sync();
-        maBlend.sync();
-    }
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_RENDER_STATE_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/TextureState.hxx b/vcl/inc/opengl/TextureState.hxx
deleted file mode 100644
index e285cd7704fa..000000000000
--- a/vcl/inc/opengl/TextureState.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_TEXTURE_STATE_H
-#define INCLUDED_VCL_INC_OPENGL_TEXTURE_STATE_H
-
-#include <vcl/opengl/OpenGLHelper.hxx>
-
-class TextureState
-{
-private:
-    GLuint mnCurrentTextureUnit;
-    std::vector<GLuint> maBoundTextures;
-
-public:
-    TextureState()
-        : mnCurrentTextureUnit(0)
-        , maBoundTextures(4, 0)
-    {
-    }
-
-    static void generate(GLuint& nTexture)
-    {
-        glGenTextures(1, &nTexture);
-        CHECK_GL_ERROR();
-    }
-
-    void active(GLuint nTextureUnit)
-    {
-        if (mnCurrentTextureUnit != nTextureUnit)
-        {
-            glActiveTexture(GL_TEXTURE0 + nTextureUnit);
-            CHECK_GL_ERROR();
-            mnCurrentTextureUnit = nTextureUnit;
-        }
-    }
-
-    void bind(GLuint nTexture)
-    {
-        if (maBoundTextures[mnCurrentTextureUnit] != nTexture)
-        {
-            glBindTexture(GL_TEXTURE_2D, nTexture);
-            CHECK_GL_ERROR();
-            maBoundTextures[mnCurrentTextureUnit] = nTexture;
-        }
-    }
-
-    void unbindAndDelete(GLuint nTexture)
-    {
-        unbind(nTexture);
-        glDeleteTextures(1, &nTexture);
-    }
-
-    void unbind(GLuint nTexture)
-    {
-        for (size_t i = 0; i < maBoundTextures.size(); i++)
-        {
-            if (nTexture == maBoundTextures[i])
-                maBoundTextures[i] = 0;
-        }
-    }
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_TEXTURE_STATE_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/VertexUtils.hxx b/vcl/inc/opengl/VertexUtils.hxx
deleted file mode 100644
index 9589d0e85775..000000000000
--- a/vcl/inc/opengl/VertexUtils.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_VERTEXUTILS_H
-#define INCLUDED_VCL_INC_OPENGL_VERTEXUTILS_H
-
-#include <basegfx/numeric/ftools.hxx>
-#include <epoxy/gl.h>
-#include <glm/gtx/norm.hpp>
-#include <tools/color.hxx>
-#include <vector>
-
-namespace vcl::vertex
-{
-
-template<GLenum TYPE>
-inline void addRectangle(std::vector<GLfloat>& rVertices, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-
-template<>
-inline void addRectangle<GL_TRIANGLES>(std::vector<GLfloat>& rVertices, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
-    rVertices.insert(rVertices.end(), {
-        x1, y1, x2, y1, x1, y2,
-        x1, y2, x2, y1, x2, y2
-    });
-}
-
-template<>
-inline void addRectangle<GL_TRIANGLE_FAN>(std::vector<GLfloat>& rVertices, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
-    rVertices.insert(rVertices.end(), {
-        x1, y2, x1, y1,
-        x2, y1, x2, y2
-    });
-}
-
-inline void createColor(Color nColor, GLfloat fTransparency, GLubyte& nR, GLubyte& nG, GLubyte& nB, GLubyte& nA)
-{
-    nR = nColor.GetRed();
-    nG = nColor.GetGreen();
-    nB = nColor.GetBlue();
-    nA = (1.0f - fTransparency) * 255.0f;
-}
-
-template<GLenum TYPE>
-inline void addQuadColors(std::vector<GLubyte>& rColors, Color nColor, GLfloat fTransparency);
-
-template<>
-inline void addQuadColors<GL_TRIANGLES>(std::vector<GLubyte>& rColors, Color nColor, GLfloat fTransparency)
-{
-    GLubyte nR, nG, nB, nA;
-    createColor(nColor, fTransparency, nR, nG, nB, nA);
-
-    rColors.insert(rColors.end(), {
-        nR, nG, nB, nA,
-        nR, nG, nB, nA,
-        nR, nG, nB, nA,
-        nR, nG, nB, nA,
-        nR, nG, nB, nA,
-        nR, nG, nB, nA,
-    });
-}
-
-inline void addLineSegmentVertices(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rExtrusionVectors,
-                                   glm::vec2 prevPoint, glm::vec2 prevExtrusionVector, GLfloat prevLength,
-                                   glm::vec2 currPoint, glm::vec2 currExtrusionVector, GLfloat currLength)
-{
-    rVertices.insert(rVertices.end(), {
-        prevPoint.x, prevPoint.y,
-        prevPoint.x, prevPoint.y,
-        currPoint.x, currPoint.y,
-        currPoint.x, currPoint.y,
-        prevPoint.x, prevPoint.y,
-        currPoint.x, currPoint.y,
-    });
-
-    rExtrusionVectors.insert(rExtrusionVectors.end(), {
-        -prevExtrusionVector.x, -prevExtrusionVector.y, -prevLength,
-         prevExtrusionVector.x,  prevExtrusionVector.y,  prevLength,
-        -currExtrusionVector.x, -currExtrusionVector.y, -currLength,
-        -currExtrusionVector.x, -currExtrusionVector.y, -currLength,
-         prevExtrusionVector.x,  prevExtrusionVector.y,  prevLength,
-         currExtrusionVector.x,  currExtrusionVector.y,  currLength,
-    });
-}
-
-inline glm::vec2 normalize(const glm::vec2& vector)
-{
-    if (glm::length(vector) > 0.0)
-        return glm::normalize(vector);
-    return vector;
-}
-
-inline glm::vec2 perpendicular(const glm::vec2& vector)
-{
-    return glm::vec2(-vector.y, vector.x);
-}
-
-inline float lineVectorAngle(const glm::vec2& previous, const glm::vec2& next)
-{
-    float angle = std::atan2(previous.x * next.y - previous.y * next.x,
-                             previous.x * next.x + previous.y * next.y);
-
-    return F_PI - std::fabs(angle);
-}
-
-} // end vcl::vertex
-
-#endif // INCLUDED_VCL_INC_OPENGL_VERTEXUTILS_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/framebuffer.hxx b/vcl/inc/opengl/framebuffer.hxx
deleted file mode 100644
index 4445e6198458..000000000000
--- a/vcl/inc/opengl/framebuffer.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_FRAMEBUFFER_H
-#define INCLUDED_VCL_INC_OPENGL_FRAMEBUFFER_H
-
-#include <vcl/dllapi.h>
-
-#include <opengl/texture.hxx>
-
-class OpenGLFramebuffer final
-{
-private:
-    GLuint      mnId;
-    int         mnWidth;
-    int         mnHeight;
-    GLuint      mnAttachedTexture;
-
-public:
-    OpenGLFramebuffer();
-    ~OpenGLFramebuffer();
-
-    int     GetWidth() const { return mnWidth; };
-    int     GetHeight() const { return mnHeight; };
-
-    void    Bind(GLenum eTarget = GL_FRAMEBUFFER);
-
-    static void Unbind(GLenum eTarget = GL_FRAMEBUFFER);
-
-    VCL_DLLPUBLIC bool IsFree() const;
-    bool    IsAttached( GLuint nTexture ) const;
-    bool    IsAttached( const OpenGLTexture& rTexture ) const;
-    void    AttachTexture( const OpenGLTexture& rTexture );
-    void    DetachTexture();
-
-public:
-    OpenGLFramebuffer* mpPrevFramebuffer;
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_FRAMEBUFFER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/gdiimpl.hxx b/vcl/inc/opengl/gdiimpl.hxx
deleted file mode 100644
index 8eaa454ef73e..000000000000
--- a/vcl/inc/opengl/gdiimpl.hxx
+++ /dev/null
@@ -1,396 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_OPENGLGDIIMPL_HXX
-#define INCLUDED_VCL_OPENGLGDIIMPL_HXX
-
-#include <vcl/dllapi.h>
-#include <vcl/opengl/OpenGLContext.hxx>
-
-#include <regionband.hxx>
-#include <salgeom.hxx>
-#include <salgdiimpl.hxx>
-#include <opengl/program.hxx>
-#include <opengl/texture.hxx>
-#include <opengl/RenderList.hxx>
-
-#include <memory>
-
-class SalFrame;
-class SalVirtualDevice;
-class OpenGLTests;
-
-namespace basegfx
-{
-class B2DTrapezoid;
-};
-
-namespace tools
-{
-    class Polygon;
-    class PolyPolygon;
-}
-
-struct TextureCombo
-{
-    std::unique_ptr<OpenGLTexture> mpTexture;
-    std::unique_ptr<OpenGLTexture> mpMask;
-};
-
-class OpenGLFlushIdle;
-
-class VCL_DLLPUBLIC OpenGLSalGraphicsImpl : public SalGraphicsImpl
-{
-    friend class OpenGLTests;
-protected:
-
-    /// This context is solely for blitting maOffscreenTex
-    rtl::Reference<OpenGLContext> mpWindowContext;
-
-    /// This context is whatever is most convenient to render
-    /// to maOffscreenTex with.
-    rtl::Reference<OpenGLContext> mpContext;
-
-    SalGraphics& mrParent;
-    /// Pointer to the SalFrame or SalVirtualDevice
-    SalGeometryProvider* mpProvider;
-    OpenGLProgram* mpProgram;
-
-    /// This idle handler is used to swap buffers after rendering.
-    std::unique_ptr<OpenGLFlushIdle> mpFlush;
-
-    // clipping
-    vcl::Region maClipRegion;
-    bool mbUseScissor;
-    bool mbUseStencil;
-
-    bool mbXORMode;
-
-    bool mbAcquiringOpenGLContext;
-
-    /**
-     * All rendering happens to this off-screen texture. For
-     * non-virtual devices, ie. windows - we will blit it and
-     * swapBuffers later.
-     */
-    OpenGLTexture maOffscreenTex;
-
-    Color mnLineColor;
-    Color mnFillColor;
-#ifdef DBG_UTIL
-    bool mProgramIsSolidColor;
-#endif
-    sal_uInt32 mnDrawCount;
-    sal_uInt32 mnDrawCountAtFlush;
-    Color mProgramSolidColor;
-    double mProgramSolidTransparency;
-
-    std::unique_ptr<RenderList> mpRenderList;
-
-    void ImplInitClipRegion();
-    void ImplSetClipBit( const vcl::Region& rClip, GLuint nMask );
-    void ImplDrawLineAA( double nX1, double nY1, double nX2, double nY2, bool edge );
-    void CheckOffscreenTexture();
-
-    void ApplyProgramMatrices(float fPixelOffset = 0.0);
-
-public:
-    bool UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" );
-    bool UseSolid( Color nColor, sal_uInt8 nTransparency );
-    bool UseSolid( Color nColor, double fTransparency );
-    bool UseSolid( Color nColor );
-    void UseSolid();
-    bool UseLine(Color nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA);
-    void UseLine(GLfloat fLineWidth, bool bUseAA);
-    bool UseInvert50();
-    bool UseInvert(SalInvert nFlags);
-
-    void DrawConvexPolygon( sal_uInt32 nPoints, const Point* pPtAry, bool blockAA = false );
-    void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA );
-    void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA );
-    void DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
-    void DrawRect( const tools::Rectangle& rRect );
-    void DrawPolygon( sal_uInt32 nPoints, const Point* pPtAry );
-    void DrawLineSegment(float x1, float y1, float x2, float y2);
-    void DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA = false );
-    void DrawRegionBand( const RegionBand& rRegion );
-    void DrawTextureRect( const SalTwoRect& rPosAry );
-    void DrawTexture( OpenGLTexture& rTexture, const SalTwoRect& rPosAry, bool bInverted = false );
-    void DrawTransformedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX, const basegfx::B2DPoint& rY );
-    void DrawAlphaTexture( OpenGLTexture& rTexture, const SalTwoRect& rPosAry, bool bInverted, bool pPremultiplied );
-    void DrawTextureDiff( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry, bool bInverted );
-    void DrawTextureWithMask( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry );
-    void DrawBlendedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, OpenGLTexture& rAlpha, const SalTwoRect& rPosAry );
-    void DrawMask( OpenGLTexture& rTexture, Color nMaskColor, const SalTwoRect& rPosAry );
-    void DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
-    void DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
-    void DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
-
-    void FlushDeferredDrawing();
-    void FlushLinesOrTriangles(DrawShaderType eType, RenderParameters const & rParameters);
-
-public:
-    // get the width of the device
-    GLfloat GetWidth() const { return mpProvider ? mpProvider->GetWidth() : 1; }
-
-    // get the height of the device
-    GLfloat GetHeight() const { return mpProvider ? mpProvider->GetHeight() : 1; }
-
-    /**
-     * check whether this instance is used for offscreen (Virtual Device)
-     * rendering ie. does it need its own context.
-     */
-    bool IsOffscreen() const { return mpProvider == nullptr || mpProvider->IsOffScreen(); }
-
-    /// Oddly not all operations obey the XOR option.
-    enum XOROption { IGNORE_XOR, IMPLEMENT_XOR };
-
-    // initialize pre-draw state
-    void InitializePreDrawState(XOROption eOpt);
-
-    // operations to do before painting
-    void PreDraw(XOROption eOpt = IGNORE_XOR);
-
-    // operations to do after painting
-    void PostDraw();
-
-    void PostBatchDraw();
-
-protected:
-    bool AcquireContext(bool bForceCreate = false);
-    void ReleaseContext();
-
-    /// create a new context for rendering to the underlying window
-    virtual rtl::Reference<OpenGLContext> CreateWinContext() = 0;
-
-    /// check whether the given context can be used for off-screen rendering
-    static bool UseContext( const rtl::Reference<OpenGLContext> &pContext )
-    {
-        return pContext->isInitialized() &&  // not released by the OS etc.
-               pContext->isVCLOnly();
-    }
-
-public:
-    OpenGLSalGraphicsImpl(SalGraphics& pParent, SalGeometryProvider *pProvider);
-    virtual ~OpenGLSalGraphicsImpl () override;
-
-    rtl::Reference<OpenGLContext> GetOpenGLContext();
-
-    virtual void Init() override;
-
-    virtual void DeInit() override;
-
-    virtual void freeResources() override;
-
-    virtual OUString getRenderBackendName() const override { return "opengl"; }
-
-    const vcl::Region& getClipRegion() const;
-    virtual bool setClipRegion( const vcl::Region& ) override;
-
-    //
-    // get the depth of the device
-    virtual sal_uInt16 GetBitCount() const override;
-
-    // get the width of the device
-    virtual tools::Long GetGraphicsWidth() const override;
-
-    // set the clip region to empty
-    virtual void ResetClipRegion() override;
-
-    // set the line color to transparent (= don't draw lines)
-
-    virtual void SetLineColor() override;
-
-    // set the line color to a specific color
-    virtual void SetLineColor( Color nColor ) override;
-
-    // set the fill color to transparent (= don't fill)
-    virtual void SetFillColor() override;
-
-    // set the fill color to a specific color, shapes will be
-    // filled accordingly
-    virtual void SetFillColor( Color nColor ) override;
-
-    // enable/disable XOR drawing
-    virtual void SetXORMode( bool bSet, bool bInvertOnly ) override;
-
-    // set line color for raster operations
-    virtual void SetROPLineColor( SalROPColor nROPColor ) override;
-
-    // set fill color for raster operations
-    virtual void SetROPFillColor( SalROPColor nROPColor ) override;
-
-    // draw --> LineColor and FillColor and RasterOp and ClipRegion
-    virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
-    virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
-
-    virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
-
-    virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
-
-    virtual void drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) override;
-
-    virtual void drawPolygon( sal_uInt32 nPoints, const Point* pPtAry ) override;
-
-    virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry ) override;
-
-    virtual bool drawPolyPolygon(
-                const basegfx::B2DHomMatrix& rObjectToDevice,
-                const basegfx::B2DPolyPolygon&,
-                double fTransparency) override;
-
-    virtual bool drawPolyLine(
-                const basegfx::B2DHomMatrix& rObjectToDevice,
-                const basegfx::B2DPolygon&,
-                double fTransparency,
-                double fLineWidth,
-                const std::vector< double >* pStroke, // MM01
-                basegfx::B2DLineJoin,
-                css::drawing::LineCap,
-                double fMiterMinimumAngle,
-                bool bPixelSnapHairline) override;
-
-    virtual bool drawPolyLineBezier(
-                sal_uInt32 nPoints,
-                const Point* pPtAry,
-                const PolyFlags* pFlgAry ) override;
-
-    virtual bool drawPolygonBezier(
-                sal_uInt32 nPoints,
-                const Point* pPtAry,
-                const PolyFlags* pFlgAry ) override;
-
-    virtual bool drawPolyPolygonBezier(
-                sal_uInt32 nPoly,
-                const sal_uInt32* pPoints,
-                const Point* const* pPtAry,
-                const PolyFlags* const* pFlgAry ) override;
-
-    // CopyArea --> No RasterOp, but ClipRegion
-    virtual void copyArea(
-                tools::Long nDestX, tools::Long nDestY,
-                tools::Long nSrcX, tools::Long nSrcY,
-                tools::Long nSrcWidth, tools::Long nSrcHeight,
-                bool bWindowInvalidate ) override;
-
-    // CopyBits and DrawBitmap --> RasterOp and ClipRegion
-    // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
-    void DoCopyBits(const SalTwoRect& rPosAry, OpenGLSalGraphicsImpl &rSrcImpl);
-
-    virtual bool blendBitmap(
-                const SalTwoRect&,
-                const SalBitmap& rBitmap ) override;
-
-    virtual bool blendAlphaBitmap(
-                const SalTwoRect&,
-                const SalBitmap& rSrcBitmap,
-                const SalBitmap& rMaskBitmap,
-                const SalBitmap& rAlphaBitmap ) override;
-
-    virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) override;
-
-    virtual void drawBitmap(
-                const SalTwoRect& rPosAry,
-                const SalBitmap& rSalBitmap,
-                const SalBitmap& rMaskBitmap ) override;
-
-    virtual void drawMask(
-                const SalTwoRect& rPosAry,
-                const SalBitmap& rSalBitmap,
-                Color nMaskColor ) override;
-
-    virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
-
-    virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
-
-    // invert --> ClipRegion (only Windows or VirDevs)
-    virtual void invert(
-                tools::Long nX, tools::Long nY,
-                tools::Long nWidth, tools::Long nHeight,
-                SalInvert nFlags) override;
-
-    virtual void invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags ) override;
-
-    virtual bool drawEPS(
-                tools::Long nX, tools::Long nY,
-                tools::Long nWidth, tools::Long nHeight,
-                void* pPtr,
-                sal_uInt32 nSize ) override;
-
-    /** Render bitmap with alpha channel
-
-        @param rSourceBitmap
-        Source bitmap to blit
-
-        @param rAlphaBitmap
-        Alpha channel to use for blitting
-
-        @return true, if the operation succeeded, and false
-        otherwise. In this case, clients should try to emulate alpha
-        compositing themselves
-     */
-    virtual bool drawAlphaBitmap(
-                const SalTwoRect&,
-                const SalBitmap& rSourceBitmap,
-                const SalBitmap& rAlphaBitmap ) override;
-
-    /** draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system */
-    virtual bool drawTransformedBitmap(
-                const basegfx::B2DPoint& rNull,
-                const basegfx::B2DPoint& rX,
-                const basegfx::B2DPoint& rY,
-                const SalBitmap& rSourceBitmap,
-                const SalBitmap* pAlphaBitmap) override;
-
-    /** Render solid rectangle with given transparency
-
-      @param nX             Top left coordinate of rectangle
-
-      @param nY             Bottom right coordinate of rectangle
-
-      @param nWidth         Width of rectangle
-
-      @param nHeight        Height of rectangle
-
-      @param nTransparency  Transparency value (0-255) to use. 0 blits and opaque, 255 a
-                            fully transparent rectangle
-
-      @returns true if successfully drawn, false if not able to draw rectangle
-     */
-    virtual bool drawAlphaRect(
-                    tools::Long nX, tools::Long nY,
-                    tools::Long nWidth, tools::Long nHeight,
-                    sal_uInt8 nTransparency ) override;
-
-    virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
-    virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rGradient) override;
-
-    virtual bool supportsOperation(OutDevSupportType eType) const override;
-
-    /// queue an idle flush of contents of the back-buffer to the screen
-    void flush();
-
-public:
-    /// do flush of contents of the back-buffer to the screen & swap.
-    void doFlush();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
deleted file mode 100644
index b69eb0282c88..000000000000
--- a/vcl/inc/opengl/program.hxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_PROGRAM_H
-#define INCLUDED_VCL_INC_OPENGL_PROGRAM_H
-
-#include <sal/config.h>
-
-#include <vector>
-
-#include <vcl/dllapi.h>
-
-#include <basegfx/point/b2dpoint.hxx>
-#include <rtl/ustring.hxx>
-#include <opengl/texture.hxx>
-
-#include <unordered_map>
-
-class Color;
-
-enum class TextureShaderType
-{
-    Normal = 0,
-    Blend,
-    Masked,
-    Diff,
-    MaskedColor
-};
-
-enum class DrawShaderType
-{
-    Normal = 0,
-    Line
-};
-
-class OpenGLProgram
-{
-private:
-    GLuint          mnId;
-    std::unordered_map< OString, GLuint >
-                    maUniformLocations;
-    sal_uInt32      mnEnabledAttribs;
-    GLuint          mnPositionAttrib;
-    GLuint          mnTexCoordAttrib;
-    GLuint          mnAlphaCoordAttrib;
-    GLuint          mnMaskCoordAttrib;
-    GLuint          mnExtrusionVectorsAttrib;
-    GLuint          mnVertexColorsAttrib;
-
-    std::vector< OpenGLTexture >     maTextures;
-    bool            mbBlending;
-
-    float mfLastWidth;
-    float mfLastHeight;
-    float mfLastPixelOffset;
-
-
-    OpenGLProgram(const OpenGLProgram &) = delete;
-public:
-    OpenGLProgram();
-    ~OpenGLProgram();
-
-    GLuint Id() { return mnId; }
-
-    bool Load( const OUString& rVertexShader, const OUString& rFragmentShader,
-               const OString& preamble, const OString& rDigest );
-    void Use();
-    void Reuse();
-    void Clean();
-
-    void SetVertices( const GLvoid* pData );
-    void SetTextureCoord( const GLvoid* pData );
-    void SetAlphaCoord( const GLvoid* pData );
-    void SetMaskCoord(const GLvoid* pData);
-    void SetExtrusionVectors(const GLvoid* pData);
-    void SetVertexColors(std::vector<GLubyte>& rColorVector);
-
-    void SetUniform1f( const OString& rName, GLfloat v1 );
-    void SetUniform2f( const OString& rName, GLfloat v1, GLfloat v2 );
-    void SetUniform1fv( const OString& rName, GLsizei nCount, GLfloat const * aValues );
-    void SetUniform2fv( const OString& rName, GLsizei nCount, GLfloat const * aValues );
-    void SetUniform1i( const OString& rName, GLint v1 );
-    void SetColor( const OString& rName, const Color& rColor );
-    void SetColor( const OString& rName, Color nColor, sal_uInt8 nTransparency );
-    void SetColorf( const OString& rName, Color nColor, double fTransparency );
-    void SetColorWithIntensity( const OString& rName, const Color& rColor, tools::Long nFactor );
-    void SetTexture( const OString& rName, OpenGLTexture& rTexture );
-    void SetTransform( const OString& rName, const OpenGLTexture& rTexture,
-                       const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX,
-                       const basegfx::B2DPoint& rY );
-    void SetIdentityTransform(const OString& rName);
-    void SetShaderType(TextureShaderType eTextureShaderType);
-    void SetShaderType(DrawShaderType eDrawShaderType);
-
-    void SetBlendMode( GLenum nSFactor, GLenum nDFactor );
-
-    void ApplyMatrix(float fWidth, float fHeight, float fPixelOffset = 0.0f);
-
-    void DrawTexture( const OpenGLTexture& rTexture );
-
-    void DrawArrays(GLenum aMode, std::vector<GLfloat>& aVertices);
-    void DrawElements(GLenum aMode, GLuint nNumberOfVertices);
-
-    bool EnableVertexAttrib(GLuint& rAttrib, const OString& rName);
-
-    void SetVertexAttrib(GLuint& rAttrib, const OString& rName, GLint nSize,
-                         GLenum eType, GLboolean bNormalized, GLsizei aStride,
-                         const GLvoid* pPointer);
-
-private:
-    GLuint GetUniformLocation( const OString& rName );
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_PROGRAM_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
deleted file mode 100644
index 61d2d37e90c2..000000000000
--- a/vcl/inc/opengl/salbmp.hxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_SALBMP_H
-#define INCLUDED_VCL_INC_OPENGL_SALBMP_H
-
-#include <vcl/opengl/OpenGLContext.hxx>
-
-#include <opengl/texture.hxx>
-
-#include <salbmp.hxx>
-
-#include <memory>
-
-struct  BitmapBuffer;
-class   BitmapPalette;
-namespace vcl
-{
-    class Kernel;
-}
-
-class VCL_PLUGIN_PUBLIC OpenGLSalBitmap final : public SalBitmap
-{
-private:
-    OpenGLTexture                       maTexture;
-    bool                                mbDirtyTexture;
-    BitmapPalette                       maPalette;
-    std::shared_ptr<sal_uInt8>          mpUserBuffer;
-    sal_uInt16                          mnBits;
-    sal_uInt32                          mnBytesPerRow;
-    int                                 mnWidth;
-    int                                 mnHeight;
-
-    virtual void updateChecksum() const override;
-
-    bool calcChecksumGL(OpenGLTexture& rInputTexture, BitmapChecksum& rChecksum) const;
-
-public:
-    OpenGLSalBitmap();
-    virtual ~OpenGLSalBitmap() override;
-
-public:
-
-    // SalBitmap methods
-    bool            Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) override;
-    bool            Create( const SalBitmap& rSalBmp ) override;
-    bool            Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ) override;
-    bool            Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount ) override;
-    virtual bool    Create( const css::uno::Reference< css::rendering::XBitmapCanvas >& rBitmapCanvas,
-                            Size& rSize,
-                            bool bMask = false ) override;
-
-    void            Destroy() final override;
-
-    Size            GetSize() const override;
-    sal_uInt16      GetBitCount() const override;
-
-    BitmapBuffer*   AcquireBuffer( BitmapAccessMode nMode ) override;
-    void            ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode ) override;
-
-    bool            GetSystemData( BitmapSystemData& rData ) override;
-
-    bool            ScalingSupported() const override;
-    bool            Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) override;
-    bool            Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uInt8 nTol ) override;
-    bool            ConvertToGreyscale() override;
-    bool            InterpretAs8Bit() override;
-
-public:
-
-    void            Create( const OpenGLTexture& rTex, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
-    OpenGLTexture&  GetTexture() const;
-    const BitmapPalette& GetBitmapPalette() const { return maPalette; }
-
-private:
-
-    GLuint          CreateTexture();
-    bool            AllocateUserData();
-    void            DeallocateUserData();
-    bool            ReadTexture();
-
-private:
-
-    bool ImplScaleFilter( const rtl::Reference< OpenGLContext > &xContext, const double& rScaleX, const double& rScaleY, GLenum nFilter );
-    static void ImplCreateKernel( const double& fScale, const vcl::Kernel& rKernel, GLfloat*& pWeights, sal_uInt32& aKernelSize );
-    bool ImplScaleConvolution(const rtl::Reference< OpenGLContext > &xContext, const double& rScaleX, const double& rScaleY, const vcl::Kernel& rKernel);
-    bool ImplScaleArea( const rtl::Reference< OpenGLContext > &xContext,
-                        double rScaleX, double rScaleY );
-
-public:
-
-    void ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag );
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_SALBMP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/texture.hxx b/vcl/inc/opengl/texture.hxx
deleted file mode 100644
index 0438b9af1541..000000000000
--- a/vcl/inc/opengl/texture.hxx
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_TEXTURE_H
-#define INCLUDED_VCL_INC_OPENGL_TEXTURE_H
-
-#include <epoxy/gl.h>
-#include <vcl/dllapi.h>
-#include <vcl/salgtype.hxx>
-#include <rtl/ustring.hxx>
-#include <tools/gen.hxx>
-
-#include <functional>
-#include <memory>
-#include <vector>
-
-class ImplOpenGLTexture
-{
-public:
-    GLuint mnTexture;
-    int    mnWidth;
-    int    mnHeight;
-    GLenum mnFilter;
-    GLuint mnOptStencil;
-
-    std::unique_ptr<std::vector<int>> mpSlotReferences;
-    std::function<void(int)> mFunctSlotDeallocateCallback;
-
-    ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate );
-    ImplOpenGLTexture( int nWidth, int nHeight, int nFormat, int nType, void const * pData );
-    ImplOpenGLTexture( int nX, int nY, int nWidth, int nHeight );
-    ~ImplOpenGLTexture();
-
-    bool InsertBuffer(int nX, int nY, int nWidth, int nHeight, int nFormat, int nType, sal_uInt8 const * pData);
-
-    void IncreaseRefCount(int nSlotNumber);
-    void DecreaseRefCount(int nSlotNumber);
-
-    void InitializeSlotMechanism(int nInitialSlotSize);
-
-    void SetSlotDeallocateCallback(std::function<void(int)> aCallback)
-    {
-        mFunctSlotDeallocateCallback = aCallback;
-    }
-
-    void ResetSlotDeallocateCallback()
-    {
-        mFunctSlotDeallocateCallback = std::function<void(int)>();
-    }
-
-    GLuint AddStencil();
-};
-
-class VCL_DLLPUBLIC OpenGLTexture final
-{
-private:
-    // if the rect size doesn't match the mpImpl one, this instance
-    // is a sub-area from the real OpenGL texture
-    tools::Rectangle maRect;
-    std::shared_ptr<ImplOpenGLTexture> mpImpl;
-    int mnSlotNumber;
-
-    inline void GetTextureRect(const SalTwoRect& rPosAry, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const;
-
-    bool IsValid() const
-    {
-        return (mpImpl && mpImpl->mnTexture != 0);
-    }
-
-public:
-                    OpenGLTexture();
-                    OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& pImpl, tools::Rectangle aRectangle, int nSlotNumber);
-
-                    OpenGLTexture( int nWidth, int nHeight, bool bAllocate = true );
-                    OpenGLTexture( int nWidth, int nHeight, int nFormat, int nType, void const * pData );
-                    OpenGLTexture( int nX, int nY, int nWidth, int nHeight );
-                    OpenGLTexture( const OpenGLTexture& rTexture );
-                    OpenGLTexture( OpenGLTexture&& rTexture ) noexcept;
-                    OpenGLTexture( const OpenGLTexture& rTexture, int nX, int nY, int nWidth, int nHeight );
-                    ~OpenGLTexture();
-
-    bool            IsUnique() const;
-
-    GLuint          Id() const;
-    int             GetWidth() const;
-    int             GetHeight() const;
-
-    void            GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool bInverted=false ) const;
-    void            GetWholeCoord( GLfloat* pCoord ) const;
-    void            Bind();
-    void            Unbind();
-    void            Read( GLenum nFormat, GLenum nType, sal_uInt8* pData );
-    GLuint          AddStencil();
-    GLuint          StencilId() const;
-
-    bool            CopyData(int nWidth, int nHeight, int nFormat, int nType, sal_uInt8 const * pData);
-
-    void            SaveToFile(const OUString& rFileName);
-
-    GLenum          GetFilter() const;
-    void            SetFilter( GLenum nFilter );
-
-                    operator bool() const;
-    OpenGLTexture&  operator=( const OpenGLTexture& rTexture );
-    OpenGLTexture&  operator=( OpenGLTexture&& rTexture );
-    bool            operator==( const OpenGLTexture& rTexture ) const;
-    bool            operator!=( const OpenGLTexture& rTexture ) const;
-
-    template<GLenum type>
-    void FillCoords(std::vector<GLfloat>& aCoordVector, const SalTwoRect& rPosAry) const;
-};
-
-template<> void OpenGLTexture::FillCoords<GL_TRIANGLES>(
-    std::vector<GLfloat>& aCoord, const SalTwoRect& rPosAry)
-    const;
-
-template<> void OpenGLTexture::FillCoords<GL_TRIANGLE_FAN>(
-    std::vector<GLfloat>& aCoord, const SalTwoRect& rPosAry)
-    const;
-
-#endif // INCLUDED_VCL_INC_OPENGL_TEXTURE_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx
deleted file mode 100644
index dff47ef7e550..000000000000
--- a/vcl/inc/opengl/win/gdiimpl.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_WIN_GDIIMPL_HXX
-#define INCLUDED_VCL_INC_OPENGL_WIN_GDIIMPL_HXX
-
-#include <memory>
-#include <vcl/dllapi.h>
-
-#include <opengl/gdiimpl.hxx>
-#include <svdata.hxx>
-#include <win/salgdi.h>
-#include <win/wingdiimpl.hxx>
-#include <o3tl/lru_map.hxx>
-#include <vcl/opengl/OpenGLContext.hxx>
-#include <ControlCacheKey.hxx>
-
-class OpenGLCompatibleDC : public CompatibleDC
-{
-public:
-    OpenGLCompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height);
-
-    virtual std::unique_ptr<Texture> getAsMaskTexture() const override;
-    // caller must delete
-    OpenGLTexture* getOpenGLTexture() const;
-
-    /// Copy bitmap data to the texture. Texture must be initialized and the correct size to hold the bitmap.
-    bool copyToTexture(Texture& aTexture) const;
-
-    struct Texture;
-};
-
-struct OpenGLCompatibleDC::Texture : public CompatibleDC::Texture
-{
-    OpenGLTexture texture;
-    virtual bool isValid() const { return !!texture; }
-    virtual int GetWidth() const { return texture.GetWidth(); }
-    virtual int GetHeight() const { return texture.GetHeight(); }
-};
-
-class WinOpenGLSalGraphicsImpl : public OpenGLSalGraphicsImpl, public WinSalGraphicsImplBase
-{
-    friend class WinLayout;
-private:
-    WinSalGraphics& mrWinParent;
-
-    bool RenderCompatibleDC(OpenGLCompatibleDC& rWhite, OpenGLCompatibleDC& rBlack,
-                            int nX, int nY, TextureCombo& rCombo);
-
-public:
-    WinOpenGLSalGraphicsImpl(WinSalGraphics& rGraphics,
-                             SalGeometryProvider *mpProvider);
-
-protected:
-    virtual rtl::Reference<OpenGLContext> CreateWinContext() override;
-
-    bool RenderTextureCombo(TextureCombo const & rCombo, int nX, int nY);
-
-public:
-    virtual void Init() override;
-    virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
-
-    virtual bool UseTextDraw() const override { return true; }
-    virtual void PreDrawText() override;
-    virtual void PostDrawText() override;
-    virtual void DrawTextMask( CompatibleDC::Texture* rTexture, Color nMaskColor, const SalTwoRect& rPosAry ) override;
-    using OpenGLSalGraphicsImpl::DrawMask;
-    virtual void DeferredTextDraw(const CompatibleDC::Texture* pTexture, Color nMaskColor, const SalTwoRect& rPosAry) override;
-
-    virtual bool UseRenderNativeControl() const override { return true; }
-    virtual bool TryRenderCachedNativeControl(ControlCacheKey const & rControlCacheKey, int nX, int nY) override;
-    virtual bool RenderAndCacheNativeControl(CompatibleDC& rWhite, CompatibleDC& rBlack,
-                                     int nX, int nY , ControlCacheKey& aControlCacheKey) override;
-
-};
-
-typedef std::pair<ControlCacheKey, std::unique_ptr<TextureCombo>> OpenGLControlCachePair;
-typedef o3tl::lru_map<ControlCacheKey, std::unique_ptr<TextureCombo>, ControlCacheHashFunction> OpenGLControlCacheType;
-
-class OpenGLControlsCache {
-    OpenGLControlCacheType cache;
-
-    OpenGLControlsCache();
-
-public:
-    static OpenGLControlCacheType & get();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/win/winlayout.hxx b/vcl/inc/opengl/win/winlayout.hxx
deleted file mode 100644
index d017bc250497..000000000000
--- a/vcl/inc/opengl/win/winlayout.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_WIN_WINLAYOUT_HXX
-#define INCLUDED_VCL_INC_OPENGL_WIN_WINLAYOUT_HXX
-
-#include <win/winlayout.hxx>
-#include <opengl/PackedTextureAtlas.hxx>
-
-struct OpenGLGlobalWinGlyphCache : public GlobalWinGlyphCache
-{
-    OpenGLGlobalWinGlyphCache()
-        : maPackedTextureAtlas(2048, 2048)
-    {
-    }
-
-    PackedTextureAtlasManager maPackedTextureAtlas;
-
-    virtual bool AllocateTexture(WinGlyphDrawElement& rElement, CompatibleDC* dc) override;
-    virtual void Prune() override;
-};
-
-class OpenGLWinGlyphCache : public WinGlyphCache
-{
-public:
-    void RemoveTextures(std::vector<GLuint>& rTextureIDs);
-
-private:
-    // This class just "adds" RemoveTextures() to the base class, it's never instantiated.
-    OpenGLWinGlyphCache() = delete;
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_WIN_WINLAYOUT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/x11/cairotextrender.hxx b/vcl/inc/opengl/x11/cairotextrender.hxx
deleted file mode 100644
index 137022fa847b..000000000000
--- a/vcl/inc/opengl/x11/cairotextrender.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_VCL_UNX_GENERIC_GDI_OPENGLX11CAIROTEXTRENDER_HXX
-#define INCLUDED_VCL_UNX_GENERIC_GDI_OPENGLX11CAIROTEXTRENDER_HXX
-
-#include <unx/x11/x11cairotextrender.hxx>
-
-class OpenGLX11CairoTextRender final : public X11CairoTextRender
-{
-public:
-    explicit OpenGLX11CairoTextRender(X11SalGraphics& rParent);
-
-    virtual cairo_t* getCairoContext() override;
-    virtual void getSurfaceOffset(double& nDX, double& nDY) override;
-    virtual void releaseCairoContext(cairo_t* cr) override;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx
deleted file mode 100644
index e55c6f1095ba..000000000000
--- a/vcl/inc/opengl/x11/gdiimpl.hxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_X11_GDIIMPL_HXX
-#define INCLUDED_VCL_INC_OPENGL_X11_GDIIMPL_HXX
-
-#include <vcl/dllapi.h>
-
-#include <unx/salgdi.h>
-#include <unx/x11/x11gdiimpl.h>
-#include <opengl/gdiimpl.hxx>
-#include <ControlCacheKey.hxx>
-
-struct TextureCombo;
-
-class X11OpenGLSalGraphicsImpl : public OpenGLSalGraphicsImpl, public X11GraphicsImpl
-{
-private:
-    X11SalGraphics& mrX11Parent;
-
-public:
-    X11OpenGLSalGraphicsImpl(X11SalGraphics& rParent);
-    virtual ~X11OpenGLSalGraphicsImpl() override;
-
-protected:
-    virtual rtl::Reference<OpenGLContext> CreateWinContext() override;
-
-public:
-    virtual void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
-
-    virtual void Init() override;
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_X11_GDIIMPL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/x11/salvd.hxx b/vcl/inc/opengl/x11/salvd.hxx
deleted file mode 100644
index 9c8d3cb70165..000000000000
--- a/vcl/inc/opengl/x11/salvd.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
-#define INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
-
-#include <memory>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#include <unx/saltype.h>
-#include <salvd.hxx>
-
-class SalDisplay;
-class X11OpenGLSalGraphics;
-class X11SalGraphics;
-
-class X11OpenGLSalVirtualDevice : public SalVirtualDevice
-{
-    SalDisplay       *mpDisplay;
-    std::unique_ptr<X11SalGraphics>
-                      mpGraphics;
-    bool              mbGraphics;         // is Graphics used
-    SalX11Screen      mnXScreen;
-    int               mnWidth;
-    int               mnHeight;
-
-public:
-    X11OpenGLSalVirtualDevice( SalGraphics const *pGraphics,
-                               tools::Long nDX, tools::Long nDY,
-                               const SystemGraphicsData *pData,
-                               std::unique_ptr<X11SalGraphics> pNewGraphics);
-    virtual ~X11OpenGLSalVirtualDevice() override;
-
-    // SalGeometryProvider
-    virtual tools::Long GetWidth() const override { return mnWidth; }
-    virtual tools::Long GetHeight() const override { return mnHeight; }
-
-    SalDisplay *            GetDisplay() const { return mpDisplay; }
-    const SalX11Screen&     GetXScreenNumber() const { return mnXScreen; }
-
-    virtual SalGraphics*    AcquireGraphics() override;
-    virtual void            ReleaseGraphics( SalGraphics* pGraphics ) override;
-
-                            // Set new size, without saving the old contents
-    virtual bool            SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/zone.hxx b/vcl/inc/opengl/zone.hxx
index f7f36ea22f84..726479b7c15c 100644
--- a/vcl/inc/opengl/zone.hxx
+++ b/vcl/inc/opengl/zone.hxx
@@ -29,22 +29,6 @@ public:
     static const char* name() { return "OpenGL"; }
 };
 
-/// Create this to not only enter the zone, but set VCL context.
-class OpenGLVCLContextZone
-{
-    OpenGLZone aZone;
-
-public:
-    OpenGLVCLContextZone();
-};
-
-class VCL_DLLPUBLIC PreDefaultWinNoOpenGLZone
-{
-public:
-    PreDefaultWinNoOpenGLZone();
-    ~PreDefaultWinNoOpenGLZone();
-};
-
 #endif // INCLUDED_VCL_INC_OPENGL_ZONE_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index b9f15c324eb1..845183953e2c 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -81,9 +81,6 @@ public:
 
     virtual SalGraphicsImpl*    GetImpl() const = 0;
 
-    /// Check that our mpImpl is OpenGL and return the context, otherwise NULL.
-    rtl::Reference<OpenGLContext> GetOpenGLContext() const;
-
     void                        setAntiAlias(bool bNew) { m_bAntiAlias = bNew; }
     bool                        getAntiAlias() const { return m_bAntiAlias; }
 
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 166b308c30e8..c93d18319e91 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -51,8 +51,6 @@ class SalFrame;
 class X11Pixmap;
 class X11SalVirtualDevice;
 class X11SalGraphicsImpl;
-class X11OpenGLSalGraphicsImpl;
-class X11OpenGLSalVirtualDevice;
 class X11SkiaSalVirtualDevice;
 class FreetypeFont;
 class ImplLayoutArgs;
@@ -68,7 +66,6 @@ namespace basegfx {
 class X11SalGraphics final : public SalGraphics
 {
     friend class X11SalGraphicsImpl;
-    friend class X11OpenGLSalGraphicsImpl;
     friend class X11CairoTextRender;
 
 public:
@@ -78,7 +75,6 @@ public:
     void                            Init( SalFrame *pFrame, Drawable aDrawable, SalX11Screen nXScreen );
     void                            Init( X11SalVirtualDevice *pVirtualDevice, cairo_surface_t* pPreExistingTarget = nullptr,
                                           SalColormap* pColormap = nullptr, bool bDeleteColormap = false );
-    void                            Init( X11OpenGLSalVirtualDevice *pVirtualDevice );
     void                            Init( X11SkiaSalVirtualDevice *pVirtualDevice );
     void                            DeInit();
 
@@ -317,7 +313,6 @@ private:
 
     bool                            bWindow_ : 1;       // is Window
     bool                            bVirDev_ : 1;       // is VirDev
-    bool                            m_bOpenGL : 1;
     bool                            m_bSkia  : 1;
 
 private:
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index b12352ee2e9d..8d2935216d87 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -46,7 +46,6 @@ struct GlobalWinGlyphCache;
 struct HDCCache;
 struct TempFontItem;
 class TextOutRenderer;
-class OpenGLControlsCache;
 #if HAVE_FEATURE_SKIA
 class SkiaControlsCache;
 #endif
@@ -130,7 +129,6 @@ public:
     // tdf#107205 need 2 instances because D2DWrite can't rotate text
     std::unique_ptr<TextOutRenderer> m_pExTextOutRenderer;
     std::unique_ptr<GlobalWinGlyphCache> m_pGlobalWinGlyphCache;
-    std::unique_ptr<OpenGLControlsCache> m_pOpenGLControlsCache;
 #if HAVE_FEATURE_SKIA
     std::unique_ptr<SkiaControlsCache> m_pSkiaControlsCache;
 #endif
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 815262cdca65..c01e9794160b 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -154,7 +154,6 @@ struct CompatibleDC::Texture
 class WinSalGraphics : public SalGraphics
 {
     friend class WinSalGraphicsImpl;
-    friend class WinOpenGLSalGraphicsImpl;
     friend class ScopedFont;
 
 protected:
diff --git a/vcl/opengl/FixedTextureAtlas.cxx b/vcl/opengl/FixedTextureAtlas.cxx
deleted file mode 100644
index 7425942d127d..000000000000
--- a/vcl/opengl/FixedTextureAtlas.cxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <memory>
-#include <sal/config.h>
-#include <vcl/opengl/OpenGLContext.hxx>
-#include <vcl/opengl/OpenGLHelper.hxx>
-
-#include <opengl/framebuffer.hxx>
-#include <opengl/texture.hxx>
-
-#include <opengl/FixedTextureAtlas.hxx>
-
-struct FixedTexture
-{
-    std::shared_ptr<ImplOpenGLTexture> mpTexture;
-    int mnFreeSlots;
-    std::vector<bool> maAllocatedSlots;
-
-    FixedTexture(int nTextureWidth, int nTextureHeight, int nNumberOfSlots)
-        : mpTexture(std::make_shared<ImplOpenGLTexture>(nTextureWidth, nTextureHeight, true))
-        , mnFreeSlots(nNumberOfSlots)
-        , maAllocatedSlots(nNumberOfSlots, false)
-    {
-        auto aDeallocateFunction = [this] (int nSlotNumber)
-        {
-            deallocateSlot(nSlotNumber);
-        };
-
-        mpTexture->SetSlotDeallocateCallback(aDeallocateFunction);
-        mpTexture->InitializeSlotMechanism(nNumberOfSlots);
-    }
-
-    ~FixedTexture()
-    {
-        mpTexture->ResetSlotDeallocateCallback();
-    }
-
-    void allocateSlot(int nSlot)
-    {
-        maAllocatedSlots[nSlot] = true;
-        mnFreeSlots--;
-    }
-
-    void deallocateSlot(int nSlot)
-    {
-        maAllocatedSlots[nSlot] = false;
-        mnFreeSlots++;
-    }
-
-    int findAndAllocateFreeSlot()
-    {
-        for (size_t i = 0; i < maAllocatedSlots.size(); ++i)
-        {
-            if (!maAllocatedSlots[i])
-            {
-                allocateSlot(i);
-                return i;
-            }
-        }
-        return -1;
-    }
-
-private:
-    FixedTexture(const FixedTexture&) = delete;
-    FixedTexture& operator=(const FixedTexture&) = delete;
-};
-
-FixedTextureAtlasManager::FixedTextureAtlasManager(int nWidthFactor, int nHeightFactor, int nSubTextureSize)
-    : mWidthFactor(nWidthFactor)
-    , mHeightFactor(nHeightFactor)
-    , mSubTextureSize(nSubTextureSize)
-{
-}
-
-FixedTextureAtlasManager::~FixedTextureAtlasManager()
-{
-}
-
-void FixedTextureAtlasManager::CreateNewTexture()
-{
-    int nTextureWidth = mWidthFactor  * mSubTextureSize;
-    int nTextureHeight = mHeightFactor * mSubTextureSize;
-    maFixedTextures.push_back(std::make_unique<FixedTexture>(nTextureWidth, nTextureHeight, mWidthFactor * mHeightFactor));
-}
-
-OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight)
-{
-    FixedTexture* pFixedTexture = nullptr;
-
-    auto funFreeSlot = [] (std::unique_ptr<FixedTexture>& inFixedTexture)
-    {
-        return inFixedTexture->mnFreeSlots > 0;
-    };
-
-    auto it = std::find_if(maFixedTextures.begin(), maFixedTextures.end(), funFreeSlot);
-
-    if (it != maFixedTextures.end())
-    {
-        pFixedTexture = (*it).get();
-    }
-    else
-    {
-        CreateNewTexture();
-        pFixedTexture = maFixedTextures.back().get();
-    }
-
-    int nSlot = pFixedTexture->findAndAllocateFreeSlot();
-
-    // Calculate coordinates in texture
-    int nX = (nSlot % mWidthFactor) * mSubTextureSize;
-    int nY = (nSlot / mWidthFactor) * mSubTextureSize;
-
-    tools::Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight));
-
-    return OpenGLTexture(pFixedTexture->mpTexture, aRectangle, nSlot);
-}
-
-OpenGLTexture FixedTextureAtlasManager::InsertBuffer(int nWidth, int nHeight, int nFormat, int nType, sal_uInt8 const * pData)
-{
-    OpenGLTexture aTexture = Reserve(nWidth, nHeight);
-    if (pData == nullptr)
-        return aTexture;
-
-    aTexture.CopyData(nWidth, nHeight, nFormat, nType, pData);
-
-    return aTexture;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx
deleted file mode 100644
index e130fb93bb22..000000000000
--- a/vcl/opengl/LineRenderUtils.cxx
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <opengl/LineRenderUtils.hxx>
-#include <opengl/VertexUtils.hxx>
-
-namespace vcl
-{
-
-LineBuilder::LineBuilder(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
-                Color nColor, GLfloat fTransparency,
-                GLfloat fLineWidth, bool bUseAA)
-    : mrVertices(rVertices)
-    , mrIndices(rIndices)
-    , mR(nColor.GetRed())
-    , mG(nColor.GetGreen())
-    , mB(nColor.GetBlue())
-    , mA((1.0f - fTransparency) * 255.0f)
-    , mfLineWidth(fLineWidth)
-    , mfLineWidthAndAA(bUseAA ? fLineWidth : -fLineWidth)
-    , mnInitialIndexSize(rIndices.size())
-    , mbIncomplete(false)
-{
-}
-
-void LineBuilder::appendLineSegment(const glm::vec2& rPoint1, const glm::vec2& rNormal1, GLfloat aExtrusion1,
-                                    const glm::vec2& rPoint2, const glm::vec2& rNormal2, GLfloat aExtrusion2)
-{
-    GLuint zero = mrVertices.size();
-
-    mrVertices.insert(mrVertices.end(), {
-        {rPoint1, glm::vec4{mR, mG, mB, mA}, glm::vec4{-rNormal1.x, -rNormal1.y, -aExtrusion1, mfLineWidthAndAA}},
-        {rPoint1, glm::vec4{mR, mG, mB, mA}, glm::vec4{ rNormal1.x,  rNormal1.y,  aExtrusion1, mfLineWidthAndAA}},
-        {rPoint2, glm::vec4{mR, mG, mB, mA}, glm::vec4{-rNormal2.x, -rNormal2.y, -aExtrusion2, mfLineWidthAndAA}},
-        {rPoint2, glm::vec4{mR, mG, mB, mA}, glm::vec4{ rNormal2.x,  rNormal2.y,  aExtrusion2, mfLineWidthAndAA}},
-    });
-
-    mrIndices.insert(mrIndices.end(), {
-        zero + 0, zero + 1, zero + 2,
-        zero + 2, zero + 1, zero + 3
-    });
-
-}
-
-void LineBuilder::appendLine(const glm::vec2& rPoint1, const glm::vec2& rPoint2)
-{
-    glm::vec2 aLineVector = vcl::vertex::normalize(rPoint2 - rPoint1);
-    glm::vec2 aNormal = vcl::vertex::perpendicular(aLineVector);
-
-    appendLineSegment(rPoint1, aNormal, 1.0f,
-                      rPoint2, aNormal, 1.0f);
-}
-
-void LineBuilder::appendAndConnectLinePoint(const glm::vec2& rPoint, const glm::vec2& aNormal, GLfloat aExtrusion)
-{
-    GLuint zero = mrVertices.size();
-
-    mrVertices.insert(mrVertices.end(), {
-        {rPoint, glm::vec4{mR, mG, mB, mA}, glm::vec4{-aNormal.x, -aNormal.y, -aExtrusion, mfLineWidthAndAA}},
-        {rPoint, glm::vec4{mR, mG, mB, mA}, glm::vec4{ aNormal.x,  aNormal.y,  aExtrusion, mfLineWidthAndAA}},
-    });
-
-    if (mnInitialIndexSize == mrIndices.size())
-    {
-        mrIndices.insert(mrIndices.end(), {
-            zero + 0, zero + 1
-        });
-        mbIncomplete = true;
-    }
-    else
-    {
-        if (mbIncomplete)
-        {
-            mrIndices.insert(mrIndices.end(), {
-                                    zero + 0,
-                zero + 0, zero - 1, zero + 1
-            });
-            mbIncomplete = false;
-        }
-        else
-        {
-            mrIndices.insert(mrIndices.end(), {
-                zero - 2, zero - 1, zero + 0,
-                zero + 0, zero - 1, zero + 1
-            });
-        }
-    }
-}
-
-void LineBuilder::appendMiterJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
-                                   glm::vec2 const& nextLineVector)
-{
-    // With miter join we calculate the extrusion vector by adding normals of
-    // previous and next line segment. The vector shows the way but we also
-    // need the length (otherwise the line will be deformed). Length factor is
-    // calculated as dot product of extrusion vector and one of the normals.
-    // The value we get is the inverse length (used in the shader):
-    // length = line_width / dot(extrusionVector, normal)
-
-    glm::vec2 normal(-prevLineVector.y, prevLineVector.x);
-
-    glm::vec2 tangent = vcl::vertex::normalize(nextLineVector + prevLineVector);
-    glm::vec2 extrusionVector(-tangent.y, tangent.x);
-    GLfloat length = glm::dot(extrusionVector, normal);
-
-    appendAndConnectLinePoint(point, extrusionVector, length);
-}
-
-void LineBuilder::appendBevelJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
-                                   const glm::vec2& nextLineVector)
-{
-    // For bevel join we just add 2 additional vertices and use previous
-    // line segment normal and next line segment normal as extrusion vector.
-    // All the magic is done by the fact that we draw triangle strips, so we
-    // cover the joins correctly.
-
-    glm::vec2 prevNormal(-prevLineVector.y, prevLineVector.x);
-    glm::vec2 nextNormal(-nextLineVector.y, nextLineVector.x);
-
-    appendAndConnectLinePoint(point, prevNormal, 1.0f);
-    appendAndConnectLinePoint(point, nextNormal, 1.0f);
-}
-
-void LineBuilder::appendRoundJoint(glm::vec2 const& point, const glm::vec2& prevLineVector,
-                                   const glm::vec2& nextLineVector)
-{
-    // For round join we do a similar thing as in bevel, we add more intermediate
-    // vertices and add normals to get extrusion vectors in the between the
-    // both normals.
-
-    // 3 additional extrusion vectors + normals are enough to make most
-    // line joins look round. Ideally the number of vectors could be
-    // calculated.
-
-    glm::vec2 prevNormal(-prevLineVector.y, prevLineVector.x);
-    glm::vec2 nextNormal(-nextLineVector.y, nextLineVector.x);
-
-    glm::vec2 middle = vcl::vertex::normalize(prevNormal + nextNormal);
-    glm::vec2 middleLeft  = vcl::vertex::normalize(prevNormal + middle);
-    glm::vec2 middleRight = vcl::vertex::normalize(middle + nextNormal);
-
-    appendAndConnectLinePoint(point, prevNormal, 1.0f);
-    appendAndConnectLinePoint(point, middleLeft, 1.0f);
-    appendAndConnectLinePoint(point, middle, 1.0f);
-    appendAndConnectLinePoint(point, middleRight, 1.0f);
-    appendAndConnectLinePoint(point, nextNormal, 1.0f);
-}
-
-void LineBuilder::appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2)
-{
-    constexpr int nRoundCapIteration = 12;
-
-    glm::vec2 lineVector = vcl::vertex::normalize(rPoint2 - rPoint1);
-    glm::vec2 normal(-lineVector.y, lineVector.x);
-    glm::vec2 previousRoundNormal = normal;
-
-    for (int nFactor = 1; nFactor <= nRoundCapIteration; nFactor++)
-    {
-        float angle = float(nFactor) * (M_PI / float(nRoundCapIteration));
-        glm::vec2 roundNormal(normal.x * glm::cos(angle) - normal.y * glm::sin(angle),
-                              normal.x * glm::sin(angle) + normal.y * glm::cos(angle));
-
-        appendLineSegment(rPoint1, previousRoundNormal, 1.0f,
-                          rPoint1, roundNormal, 1.0f);
-        previousRoundNormal = roundNormal;
-    }
-}
-
-void LineBuilder::appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2)
-{
-    glm::vec2 lineVector = vcl::vertex::normalize(rPoint2 - rPoint1);
-    glm::vec2 normal(-lineVector.y, lineVector.x);
-
-    glm::vec2 extrudedPoint = rPoint1 + -lineVector * (mfLineWidth / 2.0f);
-
-    appendLineSegment(extrudedPoint, normal, 1.0f,
-                      rPoint1,       normal, 1.0f);
-}
-
-} // end vcl
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/opengl/PackedTextureAtlas.cxx b/vcl/opengl/PackedTextureAtlas.cxx
deleted file mode 100644
index 8508bbe3ca18..000000000000
--- a/vcl/opengl/PackedTextureAtlas.cxx
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <memory>
-#include <sal/config.h>
-#include <vcl/opengl/OpenGLContext.hxx>
-#include <vcl/opengl/OpenGLHelper.hxx>
-
-#include <opengl/framebuffer.hxx>
-#include <opengl/texture.hxx>
-
-#include <opengl/PackedTextureAtlas.hxx>
-
-namespace {
-
-struct Node
-{
-    tools::Rectangle mRectangle;
-    std::unique_ptr<Node> mLeftNode;
-    std::unique_ptr<Node> mRightNode;
-    bool mOccupied;
-
-    explicit Node(int nWidth, int nHeight);
-    explicit Node(tools::Rectangle const & aRectangle);
-
-    bool isLeaf() const;
-    Node* insert(int nWidth, int nHeight, int nPadding);
-};
-
-}
-
-Node::Node(int nWidth, int nHeight)
-    : mRectangle(tools::Rectangle(Point(), Size(nWidth, nHeight)))
-    , mLeftNode()
-    , mRightNode()
-    , mOccupied(false)
-{}
-
-Node::Node(tools::Rectangle const & aRectangle)
-    : mRectangle(aRectangle)
-    , mLeftNode()
-    , mRightNode()
-    , mOccupied(false)
-{}
-
-bool Node::isLeaf() const { return mLeftNode == nullptr && mRightNode == nullptr; }
-
-Node* Node::insert(int nWidth, int nHeight, int nPadding)
-{
-    if (!isLeaf())
-    {
-        Node* pNewNode = mLeftNode->insert(nWidth, nHeight, nPadding);
-
-        if (pNewNode != nullptr)
-            return pNewNode;
-
-        return mRightNode->insert(nWidth, nHeight, nPadding);
-    }
-    else
-    {
-        if (mOccupied)
-        {
-            return nullptr;
-        }
-
-        if (nWidth > mRectangle.GetWidth() || nHeight > mRectangle.GetHeight())
-        {   // does not fit
-            return nullptr;
-        }
-
-        if (nWidth == mRectangle.GetWidth() && nHeight == mRectangle.GetHeight())
-        {   // perfect fit
-            mOccupied = true;
-            return this;
-        }
-
-        int dw = mRectangle.GetWidth() - nWidth;
-        int dh = mRectangle.GetHeight() - nHeight;
-
-        tools::Rectangle aLeftRect;
-        tools::Rectangle aRightRect;
-        if (dw > dh)
-        {
-            aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
-                                  Size(nWidth, mRectangle.GetHeight()));
-            aRightRect = tools::Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()),
-                                   Size(mRectangle.GetWidth() - nWidth - nPadding, mRectangle.GetHeight()));
-        }
-        else
-        {
-            aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
-                                  Size(mRectangle.GetWidth(), nHeight));
-            aRightRect = tools::Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight),
-                                   Size(mRectangle.GetWidth(), mRectangle.GetHeight() - nHeight - nPadding));
-        }
-
-        mLeftNode.reset(new Node(aLeftRect));
-        mRightNode.reset(new Node(aRightRect));
-
-        return mLeftNode->insert(nWidth, nHeight, nPadding);
-    }
-}
-
-struct PackedTexture
-{
-    std::shared_ptr<ImplOpenGLTexture> mpTexture;
-    std::unique_ptr<Node> mpRootNode;
-
-    PackedTexture(int nWidth, int nHeight)
-        : mpTexture(std::make_shared<ImplOpenGLTexture>(nWidth, nHeight, true))
-        , mpRootNode(new Node(nWidth, nHeight))
-    {}
-};
-
-PackedTextureAtlasManager::PackedTextureAtlasManager(int nTextureWidth, int nTextureHeight)
-    : mnTextureWidth(nTextureWidth)
-    , mnTextureHeight(nTextureHeight)
-{
-}
-
-PackedTextureAtlasManager::~PackedTextureAtlasManager()
-{
-    for (std::unique_ptr<PackedTexture>& pPackedTexture : maPackedTextures)
-    {
-        // Free texture early in VCL shutdown while we have a context.
-        pPackedTexture->mpTexture.reset();
-    }
-}
-
-void PackedTextureAtlasManager::CreateNewTexture()
-{
-    std::unique_ptr<PackedTexture> pPackedTexture(new PackedTexture(mnTextureWidth, mnTextureHeight));
-    GLuint nTextureID = pPackedTexture->mpTexture->mnTexture;
-    maPackedTextures.push_back(std::move(pPackedTexture));
-    VCL_GL_INFO("PackedTextureAtlas::CreateNewTexture adding texture: " << nTextureID <<
-                " atlases: " << maPackedTextures.size());
-}
-
-OpenGLTexture PackedTextureAtlasManager::Reserve(int nWidth, int nHeight)
-{
-    for (std::unique_ptr<PackedTexture>& pPackedTexture : maPackedTextures)
-    {
-        Node* pNode = pPackedTexture->mpRootNode->insert(nWidth, nHeight, 1);
-        if (pNode != nullptr)
-        {
-            return OpenGLTexture(pPackedTexture->mpTexture, pNode->mRectangle, -1);
-        }
-    }
-    CreateNewTexture();
-    std::unique_ptr<PackedTexture>& pPackedTexture = maPackedTextures.back();

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list