EGLFS and MinimalEGL windows are not marked as OpenGL surfaces

Several QOpenGLContext methods fails incorrectly on QWindows from EGL or
MinimalEGL. This is happens because they are incorrectly marked as raster
surfaces instead of OpenGL surfaces.

Change-Id: Ic9b3859915a9049fce442216b01dce89521fa5ee
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
Allan Sandfeld Jensen 2013-06-28 15:54:09 +02:00 committed by The Qt Project
parent 06b6061b43
commit 9fabb548da
4 changed files with 2 additions and 5 deletions

View File

@ -192,8 +192,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPo
void QEglFSBackingStore::makeCurrent()
{
// needed to prevent QOpenGLContext::makeCurrent() from failing
window()->setSurfaceType(QSurface::OpenGLSurface);
(static_cast<QEglFSWindow *>(window()->handle()))->create();
m_context->makeCurrent(window());
}

View File

@ -59,6 +59,7 @@ QEglFSWindow::QEglFSWindow(QWindow *w)
#ifdef QEGL_EXTRA_DEBUG
qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid));
#endif
w->setSurfaceType(QSurface::OpenGLSurface);
}
QEglFSWindow::~QEglFSWindow()

View File

@ -80,9 +80,6 @@ void QMinimalEglBackingStore::flush(QWindow *window, const QRegion &region, cons
void QMinimalEglBackingStore::beginPaint(const QRegion &)
{
// needed to prevent QOpenGLContext::makeCurrent() from failing
window()->setSurfaceType(QSurface::OpenGLSurface);
m_context->makeCurrent(window());
m_device = new QOpenGLPaintDevice(window()->size());
}

View File

@ -58,6 +58,7 @@ QMinimalEglWindow::QMinimalEglWindow(QWindow *w)
if (w->geometry() != screenGeometry) {
QWindowSystemInterface::handleGeometryChange(w, screenGeometry);
}
w->setSurfaceType(QSurface::OpenGLSurface);
}
void QMinimalEglWindow::setGeometry(const QRect &)