[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 2 commits - include/vcl vcl/headless
Tor Lillqvist
tml at collabora.com
Tue Mar 22 12:47:28 UTC 2016
include/vcl/bmpacc.hxx | 2 ++
vcl/headless/svpframe.cxx | 6 ------
2 files changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 840506568fdbf0cc91780e0179544fc9606e61eb
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Mar 22 14:12:29 2016 +0200
Revert "headless: for now don't allocate big cairo surfaces for invisible ...
... frames."
Unfortunately, through some unknown mechanism, the change being
reverted causes a crash in CppunitTest_sw_tiledrendering, even if it
works fine in master.
This reverts commit 4e195870ec16086ef31a51f65af0d7cbfeea723d.
Change-Id: I47c44c7e7dd40024bb63037f2c039eea18aa349a
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 56e9dd9..e1218d7 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -292,16 +292,10 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
aFrameSize.setX( 1 );
if( aFrameSize.getY() == 0 )
aFrameSize.setY( 1 );
-
- // Creating backing surfaces for invisible windows costs a big chunk of RAM.
- if (Application::IsHeadlessModeEnabled())
- aFrameSize = B2IVector( 1, 1 );
-
sal_Int32 nStride = basebmp::getBitmapDeviceStrideForWidth(m_nScanlineFormat, aFrameSize.getX());
m_aFrame = createBitmapDevice( aFrameSize, m_bTopDown, m_nScanlineFormat, nStride );
if (m_bDamageTracking)
m_aFrame->setDamageTracker(
-
basebmp::IBitmapDeviceDamageTrackerSharedPtr( new DamageTracker ) );
// update device in existing graphics
for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();
commit 6a215542794b71acc2a76984f2ab485876825c34
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Mar 22 14:06:15 2016 +0200
Some more sanity asserts can't hurt
Change-Id: I9b2f70ea98968aa98498cb754c2ebe494b6ecda7
diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx
index ebc00c7..662f416 100644
--- a/include/vcl/bmpacc.hxx
+++ b/include/vcl/bmpacc.hxx
@@ -376,7 +376,9 @@ inline Scanline BitmapReadAccess::GetScanline(long nY) const
inline BitmapColor BitmapReadAccess::GetPixel(long nY, long nX) const
{
assert(mpBuffer && mpScanBuf && "Access is not valid!");
+ assert(nX >= 0 && "x-coordinate out of range!");
assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!");
+ assert(nY >= 0 && "y-coordinate out of range!");
assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!");
return mFncGetPixel(mpScanBuf[nY], nX, maColorMask );
More information about the Libreoffice-commits
mailing list