/source/bg/sc/

atom+xml'/>
summaryrefslogtreecommitdiff
path: root/include/vcl/BinaryDataContainer.hxx
AgeCommit message (Collapse)Author
2023-05-18tdf#63130 reduce large memory copies when reading from BinaryDataContainerNoel Grandin
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>
2023-05-05BinaryDataContainer swap out implementation.Michael Meeks
We can easily accumulate a large number of in-memory graphic objects, and swapping these as well as the un-compressed images can become important. For now we swap out the container when the image is swapped out, however it seems unlikely it will ever need to be swapped in again. Despite the shared pImpl, we retained the reference counting on the underling vector to keep this immutable while we hand out a MemoryStream reference to it. Change-Id: Ib7ca45afb8499460b1852461f7c11afca3f3cdfa Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151359 Tested-by: Jenkins
2023-04-13BinaryDataContainer: hand out shared_ptr's to SvStreams.Michael Meeks
Hide the SvMemoryStream implementation detail better - this could be served from a file in future. Also couple lifecycle of the SvMemoryStream to the vector backing it. Change-Id: Ia9b28b57b8df4ce57286effd4d1753bf345fc10e Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149917 Tested-by: Jenkins
2023-04-13BinaryDataContainer: pure re-factor - encapsulate cbegin/cendMichael Meeks
Change-Id: Ic8dbf0afdb96a0f1be210eedfbd12ef6467dd29f Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149916 Tested-by: Jenkins
2023-04-03BinaryDataContainer: pure re-factor to encapsulate stream copying.Michael Meeks
Change-Id: Iab24e8d18bf7badbca672fbdbf455f78d08f41a0 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149905 Tested-by: Jenkins
2023-03-08Simplify usage of BinaryDataContainerMike Kaganski
It is always used to store data read from streams Change-Id: I613bc446eaadf98d2b1c012002d38f23d79a40ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148450 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-30loplugin:constmethod handle more casesNoel Grandin
remove some of the naming limitations, and handle pointer parameters better. I only let the plugin run up till vcl/ Change-Id: Ice916e0157031ab531c47f10778f406b07966251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-19vcl: a way to create data for BinaryDataContainer without copyingTomaž Vajngerl
Construstor for BinaryDataContainer taking unique_ptr<sal_uInt8> represents a way how to create and fill the data for the container and make sure that the container is the only one that is managing the data after construction. Generally we don't want to give the access to the internal shared_ptr to the outside, so with the unique_ptr we make sure that there is no outside references present (which would be the case if the we would take shared_ptr as the constructor) and the unique_ptr is cleared (moved) after construction. Change-Id: I123114c8bee92e342740d94a784b2c16e2564528 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108441 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-12loplugin:noexceptmoveStephan Bergmann
...since 80497c7d81af36f703d122ac78baa26387a5854d "vcl: implement BinaryDataContainer copy, move + test" Change-Id: Ifb9fb074d3263686ec498ef889c25f24dd4a4013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-10vcl: implement BinaryDataContainer copy, move + testTomaž Vajngerl
Also remove constructor that takes size only - BinaryDataContainer should always be constructed with data, that is copied into the container and should be immutable. Change-Id: Ic61b393b7729b948843bd20e6676c9290c68936f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108439 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-04Fix typosAndrea Gelmini
Change-Id: I1c43f0704dd7636f414ed7697b48f5092dc531c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108422 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-30vcl: Fix isEmpty method in BinaryDataContainerTomaž Vajngerl
Change-Id: I638473841be92d46f4a6ab2bac1b6f63ef7982ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108450 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-28vcl: add BinaryDataContainer and change GfxLink to use itTomaž Vajngerl
Add a wrapper for shared_ptr<sal_uInt8> called BinaryDataContainer, which is used to easily manage the binary data - mainly for a better reuse, control and to prevent duplication. Change-Id: I68140ec379dba4a5ab1b624a334129bba2401998 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108255 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>