summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-09 11:33:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-09 13:28:24 +0000
commit68aac9b1764338df0b6e7dc927955fecaa015d29 (patch)
treef4c972e8c89fe20d8a670bcd0ec92daafa214f73
parentd3816ab9dbd44237aa518c2e6176532ffc46a84c (diff)
bmp is never 'unique' so always copied
cause we have a shared_ptr to it at this point, so its never unique, so a new copy is always generated. this really peaks memory with large images. Change-Id: I53dab2a1f6e5102b9af08dd6365187a383f7c247 Reviewed-on: https://gerrit.libreoffice.org/35003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/gdi/bmpacc.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 5bf02c551953..2e987fa2abf9 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -56,6 +56,7 @@ void BitmapInfoAccess::ImplCreate( Bitmap& rBitmap )
{
if( mnAccessMode == BitmapAccessMode::Write && !maBitmap.ImplGetImpBitmap() )
{
+ xImpBmp.reset();
rBitmap.ImplMakeUnique();
xImpBmp = rBitmap.ImplGetImpBitmap();
}