summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-08-25 11:47:31 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-08-26 06:10:07 +0200
commitf108b53e158dcc15db1fe93a483fb573fd522274 (patch)
treeaba5962ca064ee95dacd4952381ef6fa39652442 /vcl/unx/generic
parent2b8d3d9a209b8020dac734b96a43292332aa5d44 (diff)
vcl: move X11SalInstance::CreateSalBitmap to salinst.cxx
X11SalInstance::CreateSalBitmap doesn't belong in the salbmp.cxx, but where other implementation of X11SalInstance is. Change-Id: Iffd66d55cec2532dfceb9b4ef8cf8ed30bc34e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120992 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r--vcl/unx/generic/app/salinst.cxx13
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx15
2 files changed, 13 insertions, 15 deletions
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 7a8b761dbb30..133505acab74 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -27,6 +27,7 @@
#include <unx/salframe.h>
#include <unx/sm.hxx>
#include <unx/i18n_im.hxx>
+#include <unx/salbmp.h>
#include <vcl/inputtypes.hxx>
@@ -36,7 +37,9 @@
#include <vcl/skia/SkiaHelper.hxx>
#include <config_skia.h>
#if HAVE_FEATURE_SKIA
+#include <vcl/skia/SkiaHelper.hxx>
#include <skia/x11/gdiimpl.hxx>
+#include <skia/salbmp.hxx>
#endif
// plugin factory function
@@ -238,4 +241,14 @@ std::unique_ptr<GenPspGraphics> X11SalInstance::CreatePrintGraphics()
return std::make_unique<GenPspGraphics>();
}
+std::shared_ptr<SalBitmap> X11SalInstance::CreateSalBitmap()
+{
+#if HAVE_FEATURE_SKIA
+ if (SkiaHelper::isVCLSkiaEnabled())
+ return std::make_shared<SkiaSalBitmap>();
+ else
+#endif
+ return std::make_shared<X11SalBitmap>();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index e3803a518d60..7d2db3ecd141 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -42,10 +42,6 @@
#include <o3tl/safeint.hxx>
#include <config_features.h>
-#if HAVE_FEATURE_SKIA
-#include <vcl/skia/SkiaHelper.hxx>
-#include <skia/salbmp.hxx>
-#endif
#if defined HAVE_VALGRIND_HEADERS
#include <valgrind/valgrind.h>
@@ -53,17 +49,6 @@
#include <memory>
-
-std::shared_ptr<SalBitmap> X11SalInstance::CreateSalBitmap()
-{
-#if HAVE_FEATURE_SKIA
- if (SkiaHelper::isVCLSkiaEnabled())
- return std::make_shared<SkiaSalBitmap>();
- else
-#endif
- return std::make_shared<X11SalBitmap>();
-}
-
ImplSalBitmapCache* X11SalBitmap::mpCache = nullptr;
unsigned int X11SalBitmap::mnCacheInstCount = 0;