summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-06-26 22:41:20 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-06-27 10:15:32 +0200
commit92de6c794e6033ced0c6273f70b7d425a4c4e495 (patch)
tree5035ad6ce541efa7d274438e1be30d381d71eb90
parent2b7861dd234163bfef360a803348b54f6619a89a (diff)
use boost::make_shared_noinit()
The unnecessary initialization of all elements with plain boost::make_shared() actually shows up in the profiler. Change-Id: I054b13ac74362aca7f2dfa7dc746d3a80c7f1042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97267 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--vcl/skia/salbmp.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 0474b4859405..5006f2cc824e 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -114,7 +114,7 @@ bool SkiaSalBitmap::CreateBitmapData()
#ifdef DBG_UTIL
allocate += sizeof(CANARY);
#endif
- mBuffer = boost::make_shared<sal_uInt8[]>(allocate);
+ mBuffer = boost::make_shared_noinit<sal_uInt8[]>(allocate);
#ifdef DBG_UTIL
// fill with random garbage
sal_uInt8* buffer = mBuffer.get();
@@ -763,7 +763,7 @@ void SkiaSalBitmap::EnsureBitmapUniqueData()
assert(memcmp(mBuffer.get() + allocate, CANARY, sizeof(CANARY)) == 0);
allocate += sizeof(CANARY);
#endif
- boost::shared_ptr<sal_uInt8[]> newBuffer = boost::make_shared<sal_uInt8[]>(allocate);
+ boost::shared_ptr<sal_uInt8[]> newBuffer = boost::make_shared_noinit<sal_uInt8[]>(allocate);
memcpy(newBuffer.get(), mBuffer.get(), allocate);
mBuffer = newBuffer;
}