From 5fb7752ff93b31635e64fa321917749744cc9db6 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 6 Apr 2009 18:51:52 -0700 Subject: Make sure RGB32 workaround works for windows Need to set forceRaster to true if the window surface is RGB32. Reviewed-by: TrustMe --- src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp index ef208af..ec108c4 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp @@ -111,6 +111,7 @@ void QDirectFBSurface::createWindow() dfbSurface->Release(dfbSurface); dfbWindow->GetSurface(dfbWindow, &dfbSurface); + forceRaster = (dfbSurface && QDirectFBScreen::getImageFormat(dfbSurface) == QImage::Format_RGB32); } #endif // QT_NO_DIRECTFB_WM @@ -143,6 +144,7 @@ void QDirectFBSurface::setGeometry(const QRect &rect, const QRegion &mask) IDirectFBSurface *primarySurface = screen->dfbSurface(); Q_ASSERT(primarySurface); result = primarySurface->GetSubSurface(primarySurface, &r, &dfbSurface); + forceRaster = (dfbSurface && QDirectFBScreen::getImageFormat(dfbSurface) == QImage::Format_RGB32); } else { #ifdef QT_NO_DIRECTFB_WM if (isResize) { @@ -164,6 +166,7 @@ void QDirectFBSurface::setGeometry(const QRect &rect, const QRegion &mask) QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description, QDirectFBScreen::instance()->pixelFormat()); dfbSurface = QDirectFBScreen::instance()->createDFBSurface(&description, false); + forceRaster = (dfbSurface && QDirectFBScreen::getImageFormat(dfbSurface) == QImage::Format_RGB32); } else { Q_ASSERT(dfbSurface); } -- cgit v0.12