summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-03-12 12:04:08 +0100
committerLuboš Luňák <l.lunak@collabora.com>2020-03-12 13:04:03 +0100
commita3d3e076def075f0a5bced48d89ca0d989a2467c (patch)
treec98c2eb3ba349039ac5c859bc985173b25a409d4 /vcl/win
parent22225256e8e2c64978fdcd87c5390764a3ac7b6b (diff)
rework Skia setup
Calls to SkiaHelper::isVCLSkiaEnabled() may be done from many places, even if LO uses a VCL plugin that doesn't use Skia, which leads to the Skia code not being prepared properly (and crashing/asserting). So make the SalInstance of those relevant VCL plugins call a setup function that is required for Skia actually getting enabled. Avoids crashes/asserts in the About dialog if the Skia UI checkbox is enabled but e.g. the KF5 VCL plugin is actually used. Change-Id: Ib56a5f32e88bd130a4c564031313f85e99898ba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90376 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/app/salinst.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index e97e8cbe4cdc..5a10de216f96 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -402,6 +402,9 @@ WinSalInstance::WinSalInstance()
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mxToolkitName = OUString("win");
+#if HAVE_FEATURE_SKIA
+ WinSkiaSalGraphicsImpl::prepareSkia();
+#endif
}
WinSalInstance::~WinSalInstance()