summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-05-18 08:30:15 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-25 13:04:28 +0100
commit41911db36efa2b97fdca18e468b6dd162d654a4d (patch)
treeeb901b99a1285201f2242c4a5c01f42539bbf421 /desktop
parentd6ee2be0ae0081d277133e3f86b4a7882a7d7d9f (diff)
Add rowstride to tiled rendering via LibLO.
The buffer width could be larger than the desired rendering width, hence we need to give the client access to the rowstride. Change-Id: Ic63c1f455c89960164e076ed2528d43e64e81a40
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5616323e199d..8f32a54e0a57 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -174,6 +174,7 @@ static int doc_getNumberOfParts(LibreOfficeKitDocument* pThis);
static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart);
static unsigned char* doc_paintTile(LibreOfficeKitDocument* pThis,
const int nCanvasWidth, const int nCanvasHeight,
+ int* pRowStride,
const int nTilePosX, const int nTilePosY,
const int nTileWidth, const int nTileHeight);
@@ -410,6 +411,7 @@ boost::shared_array< sal_uInt8 > ourBuffer;
// which /shouldn't/ apply in our case, but better to be safe here.
static unsigned char* doc_paintTile (LibreOfficeKitDocument* pThis,
const int nCanvasWidth, const int nCanvasHeight,
+ int* pRowStride,
const int nTilePosX, const int nTilePosY,
const int nTileWidth, const int nTileHeight)
{
@@ -432,6 +434,7 @@ static unsigned char* doc_paintTile (LibreOfficeKitDocument* pThis,
SvpSalVirtualDevice* pSalDev = static_cast< SvpSalVirtualDevice* >(aDevice.getSalVirtualDevice());
basebmp::BitmapDeviceSharedPtr pBmpDev = pSalDev->getBitmapDevice();
+ *pRowStride = pBmpDev->getScanlineStride();
ourBuffer = pBmpDev->getBuffer();
pRet = ourBuffer.get();