vcl/skia/SkiaHelper.cxx | 3 +-- vcl/skia/win/gdiimpl.cxx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-)
New commits: commit 6ba3425d4333b0318674ee3e8396de768fac5a75 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Feb 11 13:11:46 2020 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Thu Feb 13 12:38:31 2020 +0100 set up properly Vulkan context creation also for Windows This was somehow missing in aafe540f5a4c3593d8e56bbdbeb5f508994fe6d9. Change-Id: I5bdcc490b10c73ac4bc55aa6af29d08815cd18d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88532 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx index d824eddb7a4c..0404a52f98cc 100644 --- a/vcl/skia/SkiaHelper.cxx +++ b/vcl/skia/SkiaHelper.cxx @@ -222,8 +222,7 @@ GrContext* getSharedGrContext() if (done) return nullptr; done = true; - if (!createVulkanWindowContextFunction) - return nullptr; + assert(createVulkanWindowContextFunction); std::unique_ptr<sk_app::WindowContext> tmpContext = createVulkanWindowContextFunction(); // Set up using the shared context created by the call above, if successful. context = sk_app::VulkanWindowContext::getSharedGrContext(); diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx index 0d459be03722..b90239fdedc2 100644 --- a/vcl/skia/win/gdiimpl.cxx +++ b/vcl/skia/win/gdiimpl.cxx @@ -291,4 +291,20 @@ SkiaControlCacheType& SkiaControlsCache::get() return data->m_pSkiaControlsCache->cache; } +std::unique_ptr<sk_app::WindowContext> createVulkanWindowContext() +{ + SkiaZone zone; + sk_app::DisplayParams displayParams; + return sk_app::window_context_factory::MakeVulkanForWin(0, displayParams); +} + +namespace +{ +struct SetFunction +{ + SetFunction() { SkiaHelper::setCreateVulkanWindowContext(createVulkanWindowContext); } +}; +SetFunction setFunction; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits