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 /src/plugins/graphicssystems | |
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
Diffstat (limited to 'src/plugins/graphicssystems')
-rw-r--r-- | src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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); |