diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-06-08 22:54:48 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2018-06-18 02:26:27 +0200 |
commit | c8d95ccecfcd31b720fdff67bbd6acbdceaf2546 (patch) | |
tree | 7309ba29c7ded6c00015fa1254bd10f2d92c1dea /vcl/inc | |
parent | cbd0d1da85a7ae6b35023274c7267872b3d920e7 (diff) |
vcl: share GfxLink
When importing PDF as images, we store the
PDF stream in the GfxLink. For large PDFs
storing a copy of the full PDF with each
page is overkill. For example a 10MB PDF
with 200 pages will consume 2GB of memory!
Change-Id: I99913514cf5c562683080bc817668095bee69427
Reviewed-on: https://gerrit.libreoffice.org/55571
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/impgraph.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 3d63d1ed04d8..f24c6fe34255 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -77,7 +77,7 @@ private: std::unique_ptr<Animation> mpAnimation; std::shared_ptr<GraphicReader> mpContext; std::shared_ptr<ImpSwapFile> mpSwapFile; - std::unique_ptr<GfxLink> mpGfxLink; + std::shared_ptr<GfxLink> mpGfxLink; GraphicType meType; mutable sal_uLong mnSizeBytes; bool mbSwapOut; @@ -210,7 +210,7 @@ private: bool ImplIsSwapOut() const { return mbSwapOut;} bool ImplIsDummyContext() const { return mbDummyContext; } - void ImplSetLink( const GfxLink& ); + void ImplSetLink( const std::shared_ptr<GfxLink>& ); GfxLink ImplGetLink(); bool ImplIsLink() const; |