directfb: Use the QPlatformWindow in the DirectFB Backingstore
Remove usage of QDirectFbConvenience::dfbDisplayLayer in the QDirectFbBackingStore code and resolve the IDirectFBWindow through the QPlatformWindow. Change-Id: Ia7db8dedc91096648bc9de029d034002ba0d6a03 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
parent
426cda9089
commit
c420e1f101
@ -43,6 +43,7 @@
|
||||
#include "qdirectfbintegration.h"
|
||||
#include "qdirectfbblitter.h"
|
||||
#include "qdirectfbconvenience.h"
|
||||
#include "qdirectfbwindow.h"
|
||||
#include <private/qpixmap_blitter_p.h>
|
||||
|
||||
#include <QtCore/qdebug.h>
|
||||
@ -52,15 +53,9 @@ QT_BEGIN_NAMESPACE
|
||||
QDirectFbBackingStore::QDirectFbBackingStore(QWindow *window)
|
||||
: QPlatformBackingStore(window), m_pixmap(0), m_pmdata(0)
|
||||
{
|
||||
IDirectFBWindow *dfbWindow = static_cast<QDirectFbWindow *>(window->handle())->dfbWindow();
|
||||
dfbWindow->GetSurface(dfbWindow, m_dfbSurface.outPtr());
|
||||
|
||||
QDirectFBPointer<IDirectFBDisplayLayer> layer(QDirectFbConvenience::dfbDisplayLayer());
|
||||
|
||||
DFBWindowID id(window->winId());
|
||||
QDirectFBPointer<IDirectFBWindow> dfbWindow;
|
||||
|
||||
layer->GetWindow(layer.data(), id, dfbWindow.outPtr());
|
||||
|
||||
dfbWindow->GetSurface(dfbWindow.data(), m_dfbSurface.outPtr());
|
||||
//WRONGSIZE
|
||||
QDirectFbBlitter *blitter = new QDirectFbBlitter(window->size(), m_dfbSurface.data());
|
||||
m_pmdata = new QDirectFbBlitterPlatformPixmap;
|
||||
|
@ -194,3 +194,8 @@ bool QDirectFbWindow::setMouseGrabEnabled(bool grab)
|
||||
|
||||
return res == DFB_OK;
|
||||
}
|
||||
|
||||
IDirectFBWindow *QDirectFbWindow::dfbWindow() const
|
||||
{
|
||||
return m_dfbWindow.data();
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
void lower();
|
||||
WId winId() const;
|
||||
|
||||
IDirectFBWindow *dfbWindow() const;
|
||||
|
||||
private:
|
||||
QDirectFBPointer<IDirectFBWindow> m_dfbWindow;
|
||||
QDirectFbInput *m_inputHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user