summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-08-12 13:24:07 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-08-23 14:59:08 +0200
commit13acc8a5df8db5fa24d72c1d44b35e41e4ca2a7c (patch)
treecbffe0b2afee7b1796cfce03a96640954e977aff /vcl/osx
parent00083cfa840269ef5e569c7c4a6a09a34e6ce2db (diff)
first WIP version of mac skia SalGraphics backend
It doesn't yet blit to screen, but the basics should be there. Change-Id: I0f77b66756f578d84d0cee16cda00e7a2fea714f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120805 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salinst.cxx22
-rw-r--r--vcl/osx/salmacos.cxx2
2 files changed, 22 insertions, 2 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 75aea4d5415a..08fae66b4ad3 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -73,6 +73,13 @@
#include <apple_remote/RemoteControl.h>
#include <postmac.h>
+#include <config_features.h>
+#if HAVE_FEATURE_SKIA
+#include <vcl/skia/SkiaHelper.hxx>
+#include <skia/salbmp.hxx>
+#include <skia/osx/gdiimpl.hxx>
+#endif
+
extern "C" {
#include <crt_externs.h>
}
@@ -350,6 +357,10 @@ AquaSalInstance::AquaSalInstance()
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mxToolkitName = OUString("osx");
+
+#if HAVE_FEATURE_SKIA
+ AquaSkiaSalGraphicsImpl::prepareSkia();
+#endif
}
AquaSalInstance::~AquaSalInstance()
@@ -361,6 +372,10 @@ AquaSalInstance::~AquaSalInstance()
[pDockMenu release];
pDockMenu = nil;
}
+
+#if HAVE_FEATURE_SKIA
+ SkiaHelper::cleanup();
+#endif
}
void AquaSalInstance::TriggerUserEventProcessing()
@@ -877,7 +892,12 @@ SalSystem* AquaSalInstance::CreateSalSystem()
std::shared_ptr<SalBitmap> AquaSalInstance::CreateSalBitmap()
{
- return std::make_shared<QuartzSalBitmap>();
+#if HAVE_FEATURE_SKIA
+ if (SkiaHelper::isVCLSkiaEnabled())
+ return std::make_shared<SkiaSalBitmap>();
+ else
+#endif
+ return std::make_shared<QuartzSalBitmap>();
}
OUString AquaSalInstance::getOSVersion()
diff --git a/vcl/osx/salmacos.cxx b/vcl/osx/salmacos.cxx
index bc5afba086b1..78b06fc911dd 100644
--- a/vcl/osx/salmacos.cxx
+++ b/vcl/osx/salmacos.cxx
@@ -103,7 +103,7 @@ void AquaGraphicsBackend::copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcG
if (pSrcGraphics)
{
AquaSalGraphics* pSrc = static_cast<AquaSalGraphics*>(pSrcGraphics);
- pSrcShared = &pSrc->getAquaGraphicsBackend()->mrShared;
+ pSrcShared = &pSrc->getAquaGraphicsBackend()->GetShared();
}
else
pSrcShared = &mrShared;