From a5351434fbea1126961f5dbaa986e7c9e686c24e Mon Sep 17 00:00:00 2001 From: tsahi glik Date: Thu, 16 Jan 2014 12:51:44 -0800 Subject: fix rendering issues in iOS with aqua --- vcl/quartz/salgdi.cxx | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'vcl/quartz/salgdi.cxx') diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 9f07939ef828..252a025edf56 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -806,6 +806,8 @@ bool SvpSalGraphics::CheckContext() { if (mbForeignContext) return true; + if(m_aDevice == NULL) // fix tiledrendering crash when changing content size + return false; const basegfx::B2IVector size = m_aDevice->getSize(); const basegfx::B2IVector bufferSize = m_aDevice->getBufferSize(); @@ -829,32 +831,14 @@ bool SvpSalGraphics::CheckContext() kCGImageAlphaNone); break; case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: - mrContext = CGBitmapContextCreate(pixelBuffer.get(), - bufferSize.getX(), bufferSize.getY(), - 8, scanlineStride, - CGColorSpaceCreateDeviceRGB(), - kCGImageAlphaNoneSkipLast); - break; case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: - mrContext = CGBitmapContextCreate(pixelBuffer.get(), - bufferSize.getX(), bufferSize.getY(), - 8, scanlineStride, - CGColorSpaceCreateDeviceRGB(), - kCGImageAlphaNoneSkipFirst); - break; - case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: - mrContext = CGBitmapContextCreate(pixelBuffer.get(), - bufferSize.getX(), bufferSize.getY(), - 8, scanlineStride, - CGColorSpaceCreateDeviceRGB(), - kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little); - break; case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: mrContext = CGBitmapContextCreate(pixelBuffer.get(), bufferSize.getX(), bufferSize.getY(), 8, scanlineStride, CGColorSpaceCreateDeviceRGB(), - kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Little); + kCGImageAlphaNoneSkipFirst);//kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little); break; default: SAL_WARN( "vcl.ios", "CheckContext: unsupported color format " << basebmp::formatName( m_aDevice->getScanlineFormat() ) ); -- cgit