diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-05-18 08:30:15 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-25 13:04:28 +0100 |
commit | 41911db36efa2b97fdca18e468b6dd162d654a4d (patch) | |
tree | eb901b99a1285201f2242c4a5c01f42539bbf421 /include | |
parent | d6ee2be0ae0081d277133e3f86b4a7882a7d7d9f (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 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 5 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index b893067d0a67..cf2bcb2a757e 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -86,9 +86,14 @@ struct _LibreOfficeKitDocumentClass int nPart); // Get a pointer to a raw array, of size 3*nCanvasWidth*nCanvasHeight + // Basebmp's bitmap device seems to round the width up if needed + // for its internal buffer, i.e. the rowstride for the buffer may be larger + // than the desired width, hence we need to be able to return the + // rowstride too. unsigned char* (*paintTile) (LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, + int* pRowStride, const int nTilePosX, const int nTilePosY, const int nTileWidth, diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 6fd2512bd477..09b4ae61b28f 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -61,12 +61,13 @@ public: inline unsigned char* paintTile(const int nCanvasWidth, const int nCanvasHeight, + int* pRowStride, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight) { - return mpDoc->pClass->paintTile(mpDoc, nCanvasWidth, nCanvasHeight, + return mpDoc->pClass->paintTile(mpDoc, nCanvasWidth, nCanvasHeight, pRowStride, nTilePosX, nTilePosY, nTileWidth, nTileHeight); } #endif // LOK_USE_UNSTABLE_API |