diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-10-02 17:41:26 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2018-10-02 21:10:48 +0300 |
commit | baddd90d4ac0af1efe8bd09f3993d2b2f48d62b6 (patch) | |
tree | b99d8105634070b7b5b572172d176c3a0b54f33c /ios | |
parent | 51591ae750df644738bba4e1c8a2bb81d183a572 (diff) |
LibreOfficeKit wants the tile pixmap bytes to be in BGRA order in memory
To get that with CoreGraphics on iOS we need to use also
kCGImageByteOrder32Little in the CGBitmapContextCreate() call,
otherwise the bytes will be in ARGB order in memory.
(Not touching the macOS code here.)
Change-Id: I3c2dd94feb1c6bf46c5b335f5901b29e5fe1e7fb
Diffstat (limited to 'ios')
-rw-r--r-- | ios/UnitTest/UnitTest/ViewController.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ios/UnitTest/UnitTest/ViewController.mm b/ios/UnitTest/UnitTest/ViewController.mm index a955812d6f3c..c79c003547c8 100644 --- a/ios/UnitTest/UnitTest/ViewController.mm +++ b/ios/UnitTest/UnitTest/ViewController.mm @@ -43,7 +43,7 @@ static unsigned char *lo_ios_app_get_cgcontext_for_buffer(unsigned char *buffer, { assert(cgc == nullptr); - cgc = CGBitmapContextCreate(buffer, width, height, 8, width*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst); + cgc = CGBitmapContextCreate(buffer, width, height, 8, width*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little); CGContextTranslateCTM(cgc, 0, height); CGContextScaleCTM(cgc, 1, -1); |