summaryrefslogtreecommitdiff
path: root/vcl/quartz/salgdi.cxx
diff options
context:
space:
mode:
authortsahi glik <tsahi.glik@cloudon.com>2014-01-16 12:51:44 -0800
committertsahi glik <tsahi.glik@cloudon.com>2014-01-16 12:55:57 -0800
commita5351434fbea1126961f5dbaa986e7c9e686c24e (patch)
tree25dc716144a7e9414c1bfc5fa754bdf2fcea65f1 /vcl/quartz/salgdi.cxx
parent2646b1594de2c156571e66e9f7eb1afbde863a3b (diff)
fix rendering issues in iOS with aqua
Diffstat (limited to 'vcl/quartz/salgdi.cxx')
-rw-r--r--vcl/quartz/salgdi.cxx24
1 files changed, 4 insertions, 20 deletions
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() ) );