diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2023-04-03 09:39:53 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2023-04-03 15:20:32 +0100 |
commit | 6e266e0aa3821382cb3eca38eabab53930745ed9 (patch) | |
tree | d7e0fd5ef6c6c2a87ee0fb1536a2e05965a456b7 | |
parent | BinaryDataContainer: account for in-memory size of un-compressed image. (diff) | |
download | core-private/mmeeks/swapdatacontainer.tar.gz core-private/mmeeks/swapdatacontainer.zip |
Sketch of BinaryDataContainer swap out ...
private/mmeeks/swapdatacontainer
Change-Id: Ib7ca45afb8499460b1852461f7c11afca3f3cdfa
-rw-r--r-- | include/vcl/BinaryDataContainer.hxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 3 | ||||
-rw-r--r-- | vcl/source/graphic/BinaryDataContainer.cxx | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/include/vcl/BinaryDataContainer.hxx b/include/vcl/BinaryDataContainer.hxx index eb4ed13f4750..fb9150bceda3 100644 --- a/include/vcl/BinaryDataContainer.hxx +++ b/include/vcl/BinaryDataContainer.hxx @@ -56,6 +56,9 @@ public: /// return the in-memory size in bytes as of now. std::size_t getSizeBytes() const; + /// swap out to disk for now + void swapOut() const; + size_t calculateHash() const; }; diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 2749bd13119b..e87b639c0bcd 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1253,6 +1253,9 @@ bool ImpGraphic::swapOutGraphic(SvStream& rStream) break; } + if (mpGfxLink) + mpGfxLink->getDataContainer().swapOut(); + return true; } diff --git a/vcl/source/graphic/BinaryDataContainer.cxx b/vcl/source/graphic/BinaryDataContainer.cxx index 7c05144e4897..079eb2a090d0 100644 --- a/vcl/source/graphic/BinaryDataContainer.cxx +++ b/vcl/source/graphic/BinaryDataContainer.cxx @@ -73,4 +73,9 @@ bool BinaryDataContainer::isEmpty() const { return !mpData || mpData->empty(); } const sal_uInt8* BinaryDataContainer::getData() const { return mpData ? mpData->data() : nullptr; } +void BinaryDataContainer::swapOut() const +{ + // FIXME: swap out the data to disk - and force it in again in above methods. +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |