summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-13 15:54:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-23 14:25:58 +0000
commitb0f5416d7ee7c988d316df7ffa0318fa6514e4de (patch)
treec196c9966ee53499559806050bb2f01195d91c23 /desktop
parente34f290eec4f3c8d42724f1602029f5680aecde6 (diff)
Do all svp text rendering with cairo
enabling us to delete a whole pile of foo For android we patch cairo, which is internal in that case, to swap the rgb components so that cairo then matches the OpenGL GL_RGBA format so we can use it there where we don't have GL_BGRA support. Change-Id: I25e34889c7b7263438b143dd2a2ad882fb0f190a
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index cd2f82a34680..211371e49879 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -887,9 +887,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
#elif defined(ANDROID)
- InitSvpForLibreOfficeKit();
-
- ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)32) ;
+ ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)0) ;
boost::shared_array<sal_uInt8> aBuffer(pBuffer, NoDelete< sal_uInt8 >());
@@ -902,9 +900,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
#else
- InitSvpForLibreOfficeKit();
-
- ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)32) ;
+ ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)0) ;
// Set background to transparent by default.
memset(pBuffer, 0, nCanvasWidth * nCanvasHeight * 4);
@@ -915,7 +911,9 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
// Allocate a separate buffer for the alpha device.
std::vector<sal_uInt8> aAlpha(nCanvasWidth * nCanvasHeight);
memset(aAlpha.data(), 0, nCanvasWidth * nCanvasHeight);
- boost::shared_array<sal_uInt8> aAlphaBuffer(aAlpha.data(), NoDelete<sal_uInt8>());
+// TO_DO: enable alpha
+// boost::shared_array<sal_uInt8> aAlphaBuffer(aAlpha.data(), NoDelete<sal_uInt8>());
+ boost::shared_array<sal_uInt8> aAlphaBuffer;
pDevice->SetOutputSizePixelScaleOffsetAndBuffer(
Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(),