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:
parent
06b6061b43
commit
9fabb548da
@ -192,8 +192,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, 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());
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -80,9 +80,6 @@ void QMinimalEglBackingStore::flush(QWindow *window, const QRegion ®ion, 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());
|
||||
}
|
||||
|
@ -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 &)
|
||||
|
Loading…
Reference in New Issue
Block a user