summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 09:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:39 +0200
commit37f9fdc11c4e95d6a34cb515a454503256a82c63 (patch)
tree35099c65caf4c62451a5b7a7c0bac249473c9733 /vcl/quartz
parent4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (diff)
replace rtl_allocateMemory with std::malloc
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/salbmp.cxx6
-rw-r--r--vcl/quartz/salvd.cxx8
-rw-r--r--vcl/quartz/utils.cxx4
3 files changed, 9 insertions, 9 deletions
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index a78b06550530..3cde1f380955 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -870,7 +870,7 @@ CGImageRef QuartzSalBitmap::CreateCroppedImage( int nX, int nY, int nNewWidth, i
static void CFRTLFree(void* /*info*/, const void* data, size_t /*size*/)
{
- rtl_freeMemory( const_cast<void*>(data) );
+ std::free( const_cast<void*>(data) );
}
CGImageRef QuartzSalBitmap::CreateWithMask( const QuartzSalBitmap& rMask,
@@ -894,7 +894,7 @@ CGImageRef QuartzSalBitmap::CreateWithMask( const QuartzSalBitmap& rMask,
// create the alpha mask image fitting our image
// TODO: is caching the full mask or the subimage mask worth it?
int nMaskBytesPerRow = ((nWidth + 3) & ~3);
- void* pMaskMem = rtl_allocateMemory( nMaskBytesPerRow * nHeight );
+ void* pMaskMem = std::malloc( nMaskBytesPerRow * nHeight );
CGContextRef xMaskContext = CGBitmapContextCreate( pMaskMem,
nWidth, nHeight, 8, nMaskBytesPerRow, GetSalData()->mxGraySpace, kCGImageAlphaNone );
SAL_INFO("vcl.cg", "CGBitmapContextCreate(" << nWidth << "x" << nHeight << "x8," << nMaskBytesPerRow << ") = " << xMaskContext );
@@ -937,7 +937,7 @@ CGImageRef QuartzSalBitmap::CreateColorMask( int nX, int nY, int nWidth,
if (m_pUserBuffer.get() && (nX + nWidth <= mnWidth) && (nY + nHeight <= mnHeight))
{
const sal_uInt32 nDestBytesPerRow = nWidth << 2;
- sal_uInt32* pMaskBuffer = static_cast<sal_uInt32*>( rtl_allocateMemory( nHeight * nDestBytesPerRow ) );
+ sal_uInt32* pMaskBuffer = static_cast<sal_uInt32*>( std::malloc( nHeight * nDestBytesPerRow ) );
sal_uInt32* pDest = pMaskBuffer;
ImplPixelFormat* pSourcePixels = ImplPixelFormat::GetFormat( mnBits, maPalette );
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index 79d5725627a8..84f3ee8b9631 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -183,7 +183,7 @@ void AquaSalVirtualDevice::Destroy()
if( mxBitmapContext )
{
void* pRawData = CGBitmapContextGetData( mxBitmapContext );
- rtl_freeMemory( pRawData );
+ std::free( pRawData );
SAL_INFO( "vcl.cg", "CGContextRelease(" << mxBitmapContext << ")" );
CGContextRelease( mxBitmapContext );
mxBitmapContext = nullptr;
@@ -236,7 +236,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
mnBitmapDepth = 8; // TODO: are 1bit vdevs worth it?
const int nBytesPerRow = (mnBitmapDepth * nDX + 7) / 8;
- void* pRawData = rtl_allocateMemory( nBytesPerRow * nDY );
+ void* pRawData = std::malloc( nBytesPerRow * nDY );
#ifdef DBG_UTIL
for (ssize_t i = 0; i < nBytesPerRow * nDY; i++)
{
@@ -279,7 +279,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
mnBitmapDepth = 32;
const int nBytesPerRow = (mnBitmapDepth * nDX) / 8;
- void* pRawData = rtl_allocateMemory( nBytesPerRow * nDY );
+ void* pRawData = std::malloc( nBytesPerRow * nDY );
#ifdef DBG_UTIL
for (ssize_t i = 0; i < nBytesPerRow * nDY; i++)
{
@@ -296,7 +296,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
mnBitmapDepth = 32;
const int nBytesPerRow = (mnBitmapDepth * nDX) / 8;
- void* pRawData = rtl_allocateMemory( nBytesPerRow * nDY );
+ void* pRawData = std::malloc( nBytesPerRow * nDY );
#ifdef DBG_UTIL
for (ssize_t i = 0; i < nBytesPerRow * nDY; i++)
{
diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx
index 80c773889d2d..bbb29170a8b5 100644
--- a/vcl/quartz/utils.cxx
+++ b/vcl/quartz/utils.cxx
@@ -46,12 +46,12 @@ OUString GetOUString( CFStringRef rStr )
return OUString( reinterpret_cast<sal_Unicode const *>(pConstStr), nLength );
}
- UniChar* pStr = static_cast<UniChar*>( rtl_allocateMemory( sizeof(UniChar)*nLength ) );
+ UniChar* pStr = static_cast<UniChar*>( std::malloc( sizeof(UniChar)*nLength ) );
CFRange aRange = { 0, nLength };
CFStringGetCharacters( rStr, aRange, pStr );
OUString aRet( reinterpret_cast<sal_Unicode *>(pStr), nLength );
- rtl_freeMemory( pStr );
+ std::free( pStr );
return aRet;
}