Kaydet (Commit) baddd90d authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tor Lillqvist

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
üst 51591ae7
......@@ -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);
......
......@@ -304,7 +304,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
}
#endif
mxBitmapContext = CGBitmapContextCreate( pRawData, nDX, nDY,
8, nBytesPerRow, GetSalData()->mxRGBSpace, kCGImageAlphaNoneSkipFirst );
8, nBytesPerRow, GetSalData()->mxRGBSpace, kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little );
SAL_INFO( "vcl.cg", "CGBitmapContextCreate(" << nDX << "x" << nDY << "x32) = " << mxBitmapContext );
xCGContext = mxBitmapContext;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment