summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-01-31 17:15:21 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-02-05 12:15:28 +0100
commitf609a16a52f1ac37f1edd297cf1d9e5f2a294724 (patch)
treea5a8efb46646538283b5ad9c3a7ee178b5c2e170 /desktop
parentc59f37b9735a0ca122f29606508c50d25bbaa985 (diff)
lok: render image preview with lower resolution
renderShapeSelection callback is used to render image previews which are later used during eg. rotation. Do not render preview with original size which slows down app a lot. Use 1280x720 max. Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129497 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f9b1d3e0ea96..45aa9ad4cbfb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3953,6 +3953,7 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
}
aMediaDescriptor["SelectionOnly"] <<= true;
aMediaDescriptor["OutputStream"] <<= xOut;
+ aMediaDescriptor["IsPreview"] <<= true; // will down-scale graphics
xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());