diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-02-22 13:13:35 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-02-23 16:47:35 (GMT) |
commit | 196e1484c22f6347061fa433987a86d90e178a55 (patch) | |
tree | a587f5fc7511755055dc8eaff1513b1983367966 | |
parent | 53b0fc5d7fc7ad431cf91e41a75a9f6b740c830e (diff) | |
download | Qt-196e1484c22f6347061fa433987a86d90e178a55.zip Qt-196e1484c22f6347061fa433987a86d90e178a55.tar.gz Qt-196e1484c22f6347061fa433987a86d90e178a55.tar.bz2 |
Minimaldfb: try to make pixelformat of window the same as the layer
-rw-r--r-- | src/gui/image/qpixmap_blitter.cpp | 5 | ||||
-rw-r--r-- | src/gui/image/qpixmap_blitter_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_qws_p.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_blitter.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_blitter_p.h | 3 | ||||
-rw-r--r-- | src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp | 10 |
6 files changed, 24 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index f82a67d..a22bd8f 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -8,6 +8,7 @@ #include <private/qdrawhelper_p.h> +#ifndef QT_NO_BLITTABLE static int global_ser_no = 0; QBlittablePixmapData::QBlittablePixmapData(QPixmapData::PixelType type) @@ -52,7 +53,9 @@ void QBlittablePixmapData::resize(int width, int height) m_blittable = 0; delete m_engine; m_engine = 0; +#ifdef Q_WS_LITE d = QApplicationPrivate::graphicsSystem()->screens().at(0)->depth(); +#endif w = width; h = height; is_null = (w <= 0 || h <= 0); @@ -257,3 +260,5 @@ QRectF QBlittablePixmapData::clipAndTransformRect(const QRectF &rect) const return transformationRect; } #endif //QT_BLITTER_RASTEROVERLAY + +#endif //QT_NO_BLITTABLE diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h index 73f80a8..1d85cd3 100644 --- a/src/gui/image/qpixmap_blitter_p.h +++ b/src/gui/image/qpixmap_blitter_p.h @@ -4,6 +4,7 @@ #include <private/qpixmapdata_p.h> #include <private/qpaintengine_blitter_p.h> +#ifndef QT_NO_BLITTABLE class Q_GUI_EXPORT QBlittablePixmapData : public QPixmapData { // Q_DECLARE_PRIVATE(QBlittablePixmapData); @@ -116,4 +117,5 @@ inline void QBlittablePixmapData::unmarkRasterOverlay(const QRectF &rect) #endif } +#endif // QT_NO_BLITTABLE #endif // QPIXMAP_BLITTER_P_H diff --git a/src/gui/kernel/qeventdispatcher_qws_p.h b/src/gui/kernel/qeventdispatcher_qws_p.h index 5a2b016..8d8d61c 100644 --- a/src/gui/kernel/qeventdispatcher_qws_p.h +++ b/src/gui/kernel/qeventdispatcher_qws_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE -class QEventDispatcherLitePrivate; +class QEventDispatcherQWSPrivate; class QEventDispatcherQWS : public QEventDispatcherUNIX { diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp index 04d3d5a..af76926 100644 --- a/src/gui/painting/qpaintengine_blitter.cpp +++ b/src/gui/painting/qpaintengine_blitter.cpp @@ -4,6 +4,8 @@ #include "private/qapplication_p.h" #include "private/qpixmap_blitter_p.h" +#ifndef QT_NO_BLITTABLE + #define STATE_XFORM_SCALE 0x00000001 #define STATE_XFORM_COMPLEX 0x00000002 @@ -658,3 +660,5 @@ void QBlittable::unlock() d->locked = false; } } + +#endif //QT_NO_BLITTABLE diff --git a/src/gui/painting/qpaintengine_blitter_p.h b/src/gui/painting/qpaintengine_blitter_p.h index 2d9add9..ecc29ba 100644 --- a/src/gui/painting/qpaintengine_blitter_p.h +++ b/src/gui/painting/qpaintengine_blitter_p.h @@ -4,6 +4,8 @@ #include "private/qpaintengineex_p.h" #include "private/qpaintengine_raster_p.h" +#ifndef QT_NO_BLITTABLE + class QBlittablePrivate; class QBlitterPaintEnginePrivate; class QBlittablePixmapData; @@ -98,4 +100,5 @@ private: }; +#endif //QT_NO_BLITTABLE #endif // QPAINTENGINE_BLITTER_P_H diff --git a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp b/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp index d51498f..07a9b8a 100644 --- a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp +++ b/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp @@ -55,6 +55,10 @@ QDirectFbWindowSurface::QDirectFbWindowSurface(QWidget *window) { window->setWindowSurface(this); + IDirectFBDisplayLayer *layer = QDirectFbConvenience::dfbDisplayLayer(); + DFBDisplayLayerConfig layerConfig; + layer->GetConfiguration(layer,&layerConfig); + DFBWindowDescription description; memset(&description,0,sizeof(DFBWindowDescription)); description.flags = DFBWindowDescriptionFlags(DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_POSX|DWDESC_POSY|DWDESC_SURFACE_CAPS @@ -66,13 +70,17 @@ QDirectFbWindowSurface::QDirectFbWindowSurface(QWidget *window) description.height = window->rect().height(); description.posx = window->rect().x(); description.posy = window->rect().y(); + + if (layerConfig.surface_caps & DSCAPS_PREMULTIPLIED) + description.surface_caps = DSCAPS_PREMULTIPLIED; + description.pixelformat = layerConfig.pixelformat; + #if DIRECTFB_MINOR_VERSION >= 1 description.options = DFBWindowOptions(DWOP_ALPHACHANNEL); #endif description.caps = DFBWindowCapabilities(DWCAPS_DOUBLEBUFFER|DWCAPS_ALPHACHANNEL); description.surface_caps = DSCAPS_PREMULTIPLIED; - IDirectFBDisplayLayer *layer = QDirectFbConvenience::dfbDisplayLayer(); DFBResult result = layer->CreateWindow(layer,&description,&m_dfbWindow); if (result != DFB_OK) { DirectFBError("QDirectFbGraphicsSystemScreen: failed to create window",result); |