Fix image format use in cocoa plugin

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 <samuel.rodal@nokia.com>
This commit is contained in:
Gunnar Sletta 2011-12-01 11:06:13 +01:00 committed by Qt by Nokia
parent c5383f2e49
commit 389538c2e7
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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]);