From 389538c2e76698944834526a2f36284cce109afe Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 1 Dec 2011 11:06:13 +0100 Subject: [PATCH] Fix image format use in cocoa plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The screen should be opaque. It is used to create the default pixmap data which should be RGB32 on mac. The backing store uses premultiplied in the resize but initializes with non premultiplied. Unify this to all premultiplied Change-Id: I7d17d492fcff30b555a768da852ff9be0a9d96aa Reviewed-by: Samuel Rødal --- src/plugins/platforms/cocoa/qcocoabackingstore.mm | 2 +- src/plugins/platforms/cocoa/qcocoaintegration.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm index 5a59fb5c49..0cde19644e 100644 --- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm +++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm @@ -63,7 +63,7 @@ QCocoaBackingStore::QCocoaBackingStore(QWindow *window) const QRect geo = window->geometry(); NSRect rect = NSMakeRect(geo.x(),geo.y(),geo.width(),geo.height()); - m_image = new QImage(window->geometry().size(),QImage::Format_ARGB32); + m_image = new QImage(window->geometry().size(),QImage::Format_ARGB32_Premultiplied); } QCocoaBackingStore::~QCocoaBackingStore() diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 353ed0f4f0..445f67f1e7 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -70,7 +70,7 @@ QCocoaScreen::QCocoaScreen(int screenIndex) NSRect rect = [m_screen frame]; m_geometry = QRect(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height); - m_format = QImage::Format_ARGB32; + m_format = QImage::Format_RGB32; m_depth = NSBitsPerPixelFromDepth([m_screen depth]);