summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-10-06 20:23:46 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-10-16 10:10:53 +0200
commit8062e88e73acd8d1f9a62b0bd519b499693285e3 (patch)
tree17cf711f457a17dc6b6b27f8f8b9dd00321927c5 /include
parent40d74f2def9e2255f2a7b85b3c30f76d0a0bd44e (diff)
try to make available all slide images using threads
Graphic::makeAvailable() is not thread-safe, but the jpeg loader is capable of that, and the graphic can be loaded using the stream data (which is what ultimately makeAvailable() will do anyway). This loads all images faster using threads instead of them being loaded one by one on-demand. Change-Id: Ifc39a2757834a9fb0dbafa61f13f5454e69af330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104082 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/graphicfilter.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 7ce85fd8773a..83db7db95fb8 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -294,6 +294,12 @@ public:
/// The resulting graphic is added to rGraphics on success, nullptr is added on failure.
void ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGraphics, std::vector< std::unique_ptr<SvStream> > vStreams);
+ /**
+ Tries to ensure all Graphic objects are available (Graphic::isAvailable()). Only an optimization, may
+ not process all items.
+ */
+ void MakeGraphicsAvailableThreaded(std::vector< Graphic* >& rGraphics);
+
ErrCode ImportGraphic( Graphic& rGraphic, const OUString& rPath,
SvStream& rStream,
sal_uInt16 nFormat,