[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 2 10:42:31 UTC 2020
vcl/skia/salbmp.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 98236f7265fb53ad7c59b7a4c2a580f1181de22f
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Jun 26 22:41:20 2020 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 2 12:41:57 2020 +0200
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 at collabora.com>
(cherry picked from commit fd0bcf17122c2b995437c84db49504304c946a10)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97290
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 1bf0f77bfc2a..30afc7c51d58 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();
@@ -766,7 +766,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;
}
More information about the Libreoffice-commits
mailing list