diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-10-06 20:23:46 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-10-16 10:10:53 +0200 |
commit | 8062e88e73acd8d1f9a62b0bd519b499693285e3 (patch) | |
tree | 17cf711f457a17dc6b6b27f8f8b9dd00321927c5 /sd/inc | |
parent | 40d74f2def9e2255f2a7b85b3c30f76d0a0bd44e (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 'sd/inc')
-rw-r--r-- | sd/inc/sdpage.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 4c4c3b9ca88a..a70fbf61be8a 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -48,6 +48,7 @@ class SfxItemSet; class Paragraph; class Outliner; class SdStyleSheet; +class Graphic; namespace sd { @@ -377,6 +378,12 @@ public: virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override; sal_uInt16 getPageId() const { return mnPageId; } + /** + Returns graphics objects from the page that can be prefetched before it's painted. + The pointers are temporary and should not be kept. + */ + void getGraphicsForPrefetch(std::vector<Graphic*>& graphics) const; + static sal_uInt16 mnLastPageId; private: |