summaryrefslogtreecommitdiff
path: root/vcl/skia/x11/gdiimpl.cxx
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/skia/x11/gdiimpl.cxx
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/skia/x11/gdiimpl.cxx')
-rw-r--r--vcl/skia/x11/gdiimpl.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx
index c587b143ef69..fe4553814758 100644
--- a/vcl/skia/x11/gdiimpl.cxx
+++ b/vcl/skia/x11/gdiimpl.cxx
@@ -130,13 +130,6 @@ std::unique_ptr<sk_app::WindowContext> createVulkanWindowContext()
1, SkiaHelper::RenderVulkan);
}
-namespace
-{
-struct SetFunction
-{
- SetFunction() { SkiaHelper::setCreateVulkanWindowContext(createVulkanWindowContext); }
-};
-SetFunction setFunction;
-}
+void X11SkiaSalGraphicsImpl::prepareSkia() { SkiaHelper::prepareSkia(createVulkanWindowContext); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */