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:
parent
b5a24adb26
commit
069469b468
@ -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();
|
||||
}
|
||||
|
@ -65,8 +65,6 @@ public:
|
||||
|
||||
QPlatformCursor *cursor() const;
|
||||
|
||||
QPlatformOpenGLContext *platformContext() const;
|
||||
|
||||
EGLDisplay display() const { return m_dpy; }
|
||||
|
||||
private:
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user