summaryrefslogtreecommitdiff
path: root/ios/UnitTest
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-10-10 16:17:18 +0300
committerTor Lillqvist <tml@collabora.com>2018-10-10 16:25:20 +0300
commit1d279e9c9123d50788cefb186663ef3842aaa8c2 (patch)
tree2a9449cb1894ca63201919963b3ba893421d119d /ios/UnitTest
parentd143e211b1416665d77cd1914dd7f6a6b0b4f72a (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 'ios/UnitTest')
-rw-r--r--ios/UnitTest/UnitTest/ViewController.mm25
1 files changed, 0 insertions, 25 deletions
diff --git a/ios/UnitTest/UnitTest/ViewController.mm b/ios/UnitTest/UnitTest/ViewController.mm
index c79c003547c8..fa002f107f27 100644
--- a/ios/UnitTest/UnitTest/ViewController.mm
+++ b/ios/UnitTest/UnitTest/ViewController.mm
@@ -33,31 +33,6 @@ extern "C" {
#import "ViewController.h"
#include <postmac.h>
-// This is from online's Mobile app (as it is called at the moment);
-// should of course be factored out to some common place. Here in
-// core?
-
-static thread_local CGContextRef cgc = nullptr;
-
-static unsigned char *lo_ios_app_get_cgcontext_for_buffer(unsigned char *buffer, int width, int height)
-{
- assert(cgc == nullptr);
-
- cgc = CGBitmapContextCreate(buffer, width, height, 8, width*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little);
-
- CGContextTranslateCTM(cgc, 0, height);
- CGContextScaleCTM(cgc, 1, -1);
-
- return (unsigned char*)cgc;
-}
-
-static void lo_ios_app_release_cgcontext_for_buffer()
-{
- assert(cgc != nullptr);
- CGContextRelease(cgc);
- cgc = nullptr;
-}
-
@interface ViewController ()
@end