vcl: support creating a Graphic with only GfxLink as swapped-out

Desktop / LibreOffice - Tomaž Vajngerl [collabora.co.uk] - 22 January 2021 06:49 UTC

This adds support to create a Graphic with only a GfxLink and the Graphic is in a swapped-out state. This is similar to the prepared state, but the prepared state is a special state of the Graphic. In the future, all loading will probably be done in this way and prepared state will go away, but for now this is only supported for PDF and is used in PDFium import only.

The main reason is to avoid that a multi-page PDF is immediately swapped out after loading, which just does unneeded work and freezes the application for a while.

Change-Id: I409741d27a4ad309264cdf27b2ba03f2cf37ead9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109600

3adff41ab14a vcl: support creating a Graphic with only GfxLink as swapped-out
include/vcl/graph.hxx | 1 +
vcl/inc/graphic/Manager.hxx | 3 +++
vcl/inc/impgraph.hxx | 1 +
vcl/source/filter/ipdf/pdfread.cxx | 6 +-----
vcl/source/gdi/graph.cxx | 5 +++++
vcl/source/gdi/impgraph.cxx | 17 +++++++++++++++++
vcl/source/graphic/Manager.cxx | 8 ++++++++
7 files changed, 36 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share