eglfs: Make backingstore handle unexpected scenarios gracefully

On platforms other than Android eglfs does not allow having multiple
windows when one of the windows is OpenGL. On Android however this has
to be handled silently, without aborting the application. The
backingstore lacked the necessary checks so QGLWidget-based apps were
crashing. This is now corrected.

Task-number: QTBUG-34412
Change-Id: Ifb469fa9ef391b24aed3942430c0347276809ba5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
bb10
Laszlo Agocs 2013-10-29 12:16:30 +01:00 committed by The Qt Project
parent 00bf148b07
commit 6ea7336e4a
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPo
#endif
QEglFSWindow *rootWin = m_window->screen()->rootWindow();
if (!rootWin)
if (!rootWin || !rootWin->isRaster())
return;
m_window->create();
@ -132,7 +132,7 @@ void QEglFSBackingStore::resize(const QSize &size, const QRegion &staticContents
Q_UNUSED(staticContents);
QEglFSWindow *rootWin = m_window->screen()->rootWindow();
if (!rootWin)
if (!rootWin || !rootWin->isRaster())
return;
m_image = QImage(size, QImage::Format_RGB32);