summaryrefslogtreecommitdiff
path: root/vcl/headless/svpvd.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-24 13:39:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-24 18:49:04 +0000
commit9b52b8999be86e5c6e5f5901b2640b16f08a2323 (patch)
tree218897a0bf04cb0cca2e0840d53378db16dda8db /vcl/headless/svpvd.cxx
parentf9588062dd22771395ed8e076f009deb23a0092f (diff)
Resolves: tdf#95962 incorrect scanline stride
we were reusing the stride of the surface we were cloning, but the new surface has a different underlying size. remove the custom stride argument and just change our stride calculation to use the same scheme that cairo and GDI uses, which remove another platform/drawing-system variable Change-Id: I257dac9757b121642e9ccfde7db0911edc9f3fb1 Reviewed-on: https://gerrit.libreoffice.org/20149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/headless/svpvd.cxx')
-rw-r--r--vcl/headless/svpvd.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 026da6b2935c..6eb0a114ca32 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -66,21 +66,20 @@ bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
if( ! m_aDevice.get() || m_aDevice->getSize() != aDevSize )
{
basebmp::Format nFormat = SvpSalInstance::getBaseBmpFormatForDeviceFormat(m_eFormat);
- sal_Int32 nStride = basebmp::getBitmapDeviceStrideForWidth(nFormat, aDevSize.getX());
if (m_eFormat == DeviceFormat::BITMASK)
{
std::vector< basebmp::Color > aDevPal(2);
aDevPal[0] = basebmp::Color( 0, 0, 0 );
aDevPal[1] = basebmp::Color( 0xff, 0xff, 0xff );
- m_aDevice = createBitmapDevice( aDevSize, true, nFormat, nStride,
+ m_aDevice = createBitmapDevice( aDevSize, true, nFormat,
PaletteMemorySharedVector( new std::vector< basebmp::Color >(aDevPal) ) );
}
else
{
m_aDevice = pBuffer ?
- createBitmapDevice( aDevSize, true, nFormat, nStride, pBuffer, PaletteMemorySharedVector() )
- : createBitmapDevice( aDevSize, true, nFormat, nStride );
+ createBitmapDevice( aDevSize, true, nFormat, pBuffer, PaletteMemorySharedVector() )
+ : createBitmapDevice( aDevSize, true, nFormat );
}
// update device in existing graphics