diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-18 11:48:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-18 15:15:21 +0200 |
commit | 5a4d78d9a9b45c7fa387b66f5e310447ec813034 (patch) | |
tree | 82e64c853460ae0eb54fd65adb62761e9771d5b6 /vcl/source/gdi | |
parent | 800f9233513a45aa8f8950cf929fd44cb9381d72 (diff) |
tdf#63130 reduce large memory copies when reading from BinaryDataContainer
rather than writing a bunch more code, extract the common part from
comphelper::SequenceInputStream into a new base class
Change-Id: I0d3561e3ca2e748b904128e3b5955e27196d7170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/vectorgraphicdata.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index 979fd4f18ad0..7dc51073adeb 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -196,8 +196,7 @@ void VectorGraphicData::ensureSequenceAndRange() { case VectorGraphicDataType::Svg: { - css::uno::Sequence<sal_Int8> aDataSequence = maDataContainer.getCopyAsByteSequence(); - const uno::Reference<io::XInputStream> xInputStream(new comphelper::SequenceInputStream(aDataSequence)); + const uno::Reference<io::XInputStream> xInputStream = maDataContainer.getAsXInputStream(); const uno::Reference< graphic::XSvgParser > xSvgParser = graphic::SvgTools::create(xContext); @@ -211,8 +210,7 @@ void VectorGraphicData::ensureSequenceAndRange() { const uno::Reference< graphic::XEmfParser > xEmfParser = graphic::EmfTools::create(xContext); - css::uno::Sequence<sal_Int8> aDataSequence = maDataContainer.getCopyAsByteSequence(); - const uno::Reference<io::XInputStream> xInputStream(new comphelper::SequenceInputStream(aDataSequence)); + const uno::Reference<io::XInputStream> xInputStream = maDataContainer.getAsXInputStream(); if (xInputStream.is()) { |