diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-09 11:33:14 +0000 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:15 -0500 |
commit | b29ea1014ca4baab5d492b2c80e9cc5d0bc36514 (patch) | |
tree | 9bf6a57028004d3f4cb063d5070a3042c968e873 | |
parent | f2c17cd76e7e941dbd5cdf20d0a6514bc65083a8 (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>
(cherry picked from commit 68aac9b1764338df0b6e7dc927955fecaa015d29)
(cherry picked from commit 695a59146f8baf9207c89570b496c57ffde182dd)
-rw-r--r-- | vcl/source/gdi/bmpacc.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index c55b864e9cb0..2ae93bad278f 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(); } |