vcl/unx/generic/app/salinst.cxx | 13 +++++++++++++ vcl/unx/generic/gdi/salbmp.cxx | 15 --------------- 2 files changed, 13 insertions(+), 15 deletions(-)
New commits: commit f108b53e158dcc15db1fe93a483fb573fd522274 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Aug 25 11:47:31 2021 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Aug 26 06:10:07 2021 +0200 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 <qui...@gmail.com> 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;