Made eglfs work with backing store based applications again.

Make sure we pick the same config for the context and window surface,
and do not create unnecessary window surfaces for the desktop widget.

Change-Id: I3c8fb3df9ab8a658196e41dfa1705cfca625a2d7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
This commit is contained in:
Samuel Rødal 2012-08-15 12:18:35 +02:00 committed by Qt by Nokia
parent b5a24adb26
commit 069469b468
3 changed files with 10 additions and 4 deletions

View File

@ -57,7 +57,7 @@ QEglFSBackingStore::QEglFSBackingStore(QWindow *window)
, m_texture(0)
, m_program(0)
{
m_context->setFormat(window->format());
m_context->setFormat(window->requestedFormat());
m_context->setScreen(window->screen());
m_context->create();
}

View File

@ -65,8 +65,6 @@ public:
QPlatformCursor *cursor() const;
QPlatformOpenGLContext *platformContext() const;
EGLDisplay display() const { return m_dpy; }
private:

View File

@ -72,7 +72,15 @@ QEglFSWindow::~QEglFSWindow()
void QEglFSWindow::create()
{
Q_ASSERT(!m_window);
if (m_window)
return;
if (window()->windowType() == Qt::Desktop) {
QRect rect(QPoint(), hooks->screenSize());
QPlatformWindow::setGeometry(rect);
QWindowSystemInterface::handleGeometryChange(window(), rect);
return;
}
EGLDisplay display = (static_cast<QEglFSScreen *>(window()->screen()->handle()))->display();
QSurfaceFormat platformFormat = hooks->surfaceFormatFor(window()->requestedFormat());