summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-11 16:24:33 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-25 13:04:30 +0100
commit67d7bad694928e8a5d7416de21c612822e14dadc (patch)
tree830d4242b51bdab71f39f7d18dc4901535234012 /include
parent56fea375b915bb96012b36012634523b9806040a (diff)
Use external buffer for LibLO tiled rendering.
Means we can get rid of hackily storing a reference to the last buffer we created. Change-Id: I8092a7d87bc391301f75651a59b37fbd73ac64fd
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx6
2 files changed, 6 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index f63f3a71ac91..db9aff2519a3 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -90,7 +90,8 @@ struct _LibreOfficeKitDocumentClass
// 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,
+ void (*paintTile) (LibreOfficeKitDocument* pThis,
+ unsigned char* pBuffer,
const int nCanvasWidth,
const int nCanvasHeight,
int* pRowStride,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index ee310fec0f0e..427ea833c5a9 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -59,7 +59,9 @@ public:
mpDoc->pClass->setPart(mpDoc, nPart);
}
- inline unsigned char* paintTile(const int nCanvasWidth,
+ inline void paintTile(
+ unsigned char* pBuffer,
+ const int nCanvasWidth,
const int nCanvasHeight,
int* pRowStride,
const int nTilePosX,
@@ -67,7 +69,7 @@ public:
const int nTileWidth,
const int nTileHeight)
{
- return mpDoc->pClass->paintTile(mpDoc, nCanvasWidth, nCanvasHeight, pRowStride,
+ return mpDoc->pClass->paintTile(mpDoc, pBuffer, nCanvasWidth, nCanvasHeight, pRowStride,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
}