diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-10-10 16:17:18 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-10-10 16:25:20 +0300 |
commit | 1d279e9c9123d50788cefb186663ef3842aaa8c2 (patch) | |
tree | 2a9449cb1894ca63201919963b3ba893421d119d /libreofficekit | |
parent | d143e211b1416665d77cd1914dd7f6a6b0b4f72a (diff) |
Move the iOS CGBitmapContextCreate() call do doc_paintTile()
Thus it now actually takes a buffer pointer also on iOS, like on Linux
and Android. Less confusing, more uniform. Add a separate iOS-specific
paintTileToCGContext() method to LibreOfficeKitDocumentClass that
takes a CGContextRef. Adapt callers correspondingly. (The
LibreOfficeLight code in particular needs the paintTileToCGContext().)
Change-Id: I81084806d37b9aac9f2b2bc03d0c262e991eec81
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/tilebench/tilebench.cxx | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx index 47d468f01773..1d275d6a44ed 100644 --- a/libreofficekit/qa/tilebench/tilebench.cxx +++ b/libreofficekit/qa/tilebench/tilebench.cxx @@ -166,15 +166,8 @@ static void testTile( Document *pDocument, int max_parts, { // whole part; meaningful only for non-writer documents. aTimes.emplace_back("render whole part"); -#ifndef IOS pDocument->paintTile(pPixels, nTilePixelWidth, nTilePixelHeight, nWidth/2, 2000, 1000, 1000); // not square -#else - pDocument->paintTile(lo_ios_app_get_cgcontext_for_buffer(pPixels, nTilePixelWidth, nTilePixelHeight), - nTilePixelWidth, nTilePixelHeight, - nWidth/2, 2000, 1000, 1000); // not square - lo_ios_app_release_cgcontext_for_buffer(); -#endif aTimes.emplace_back(); if (dump) dumpTile(nTilePixelWidth, nTilePixelHeight, mode, pPixels); @@ -194,15 +187,8 @@ static void testTile( Document *pDocument, int max_parts, nY = nHeight; break; } -#ifndef IOS pDocument->paintTile(pPixels, nTilePixelWidth, nTilePixelHeight, nX, nY, nTilePixelWidth, nTilePixelHeight); -#else - pDocument->paintTile(lo_ios_app_get_cgcontext_for_buffer(pPixels, nTilePixelWidth, nTilePixelHeight), - nTilePixelWidth, nTilePixelHeight, - nX, nY, nTilePixelWidth, nTilePixelHeight); - lo_ios_app_release_cgcontext_for_buffer(); -#endif nTiles++; fprintf (stderr, " rendered 1:1 tile %d at %d, %d\n", nTiles, nX, nY); @@ -226,15 +212,8 @@ static void testTile( Document *pDocument, int max_parts, nY = nHeight; break; } -#ifndef IOS pDocument->paintTile(pPixels, nTilePixelWidth, nTilePixelHeight, nX, nY, nTileTwipWidth, nTileTwipHeight); -#else - pDocument->paintTile(lo_ios_app_get_cgcontext_for_buffer(pPixels, nTilePixelWidth, nTilePixelHeight), - nTilePixelWidth, nTilePixelHeight, - nX, nY, nTileTwipWidth, nTileTwipHeight); - lo_ios_app_release_cgcontext_for_buffer(); -#endif nTiles++; fprintf (stderr, " rendered scaled tile %d at %d, %d\n", nTiles, nX, nY); |