summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-10-09 18:09:56 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-10-16 10:11:14 +0200
commita559ddd37b09a35f26a291f1a0f94608309a7d99 (patch)
tree98c067732d759793949cef87806c4815c0c7717a /sd
parent8062e88e73acd8d1f9a62b0bd519b499693285e3 (diff)
try to prefetch in threads also all graphics for the active page
Change-Id: Ib4df3914a4f510a76f08aa2f6633bfdadf54a1e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104131 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews1.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 70c9ba3a2090..09814bd7b470 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -39,6 +39,7 @@
#include <svx/fmshell.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <vcl/graphicfilter.hxx>
#include <view/viewoverlaymanager.hxx>
@@ -997,6 +998,13 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
VisAreaChanged(::tools::Rectangle(Point(), Size(1, 1)));
}
+ // Try to prefetch all graphics for the active page. This will be done
+ // in threads to be more efficient than loading them on-demand one by one.
+ std::vector<Graphic*> graphics;
+ mpActualPage->getGraphicsForPrefetch(graphics);
+ if(graphics.size() > 1) // threading does not help with loading just one
+ GraphicFilter::GetGraphicFilter().MakeGraphicsAvailableThreaded(graphics);
+
if (meEditMode == EditMode::Page)
{
/**********************************************************************