diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-09-22 12:48:10 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-09-23 08:45:47 +0200 |
commit | 19365e6e2b3311bacb2ae2abb70be5cfaf843776 (patch) | |
tree | 70168c5852cdda44d8d685644516e4066d31d92c /vcl/skia/win | |
parent | 1f5141522ffa79f2a94d0f11fa7e6008755ae6d6 (diff) |
if allocating Vulkan surface fails, fall back to Skia raster surface
Occassionally there may be very large surfaces, such as
in tdf#135952. Try to fall back to raster, which is more likely to
succeed, given that it uses system RAM instead of video RAM.
Change-Id: I81994b174e5e52066eacc5f8778e9469b042f9c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103170
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/skia/win')
-rw-r--r-- | vcl/skia/win/gdiimpl.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx index ea7cb3362386..5c5582b8ffe6 100644 --- a/vcl/skia/win/gdiimpl.cxx +++ b/vcl/skia/win/gdiimpl.cxx @@ -35,21 +35,19 @@ WinSkiaSalGraphicsImpl::WinSkiaSalGraphicsImpl(WinSalGraphics& rGraphics, { } -void WinSkiaSalGraphicsImpl::createWindowContext() +void WinSkiaSalGraphicsImpl::createWindowContext(bool forceRaster) { SkiaZone zone; sk_app::DisplayParams displayParams; - switch (SkiaHelper::renderMethodToUse()) + switch (forceRaster ? SkiaHelper::RenderRaster : SkiaHelper::renderMethodToUse()) { case SkiaHelper::RenderRaster: mWindowContext = sk_app::window_context_factory::MakeRasterForWin(mWinParent.gethWnd(), displayParams); - mIsGPU = false; break; case SkiaHelper::RenderVulkan: mWindowContext = sk_app::window_context_factory::MakeVulkanForWin(mWinParent.gethWnd(), displayParams); - mIsGPU = true; break; } } |