Bail out in composeAndFlush when makeCurrent fails
And show a warning so we have a chance of knowing what happened. Change-Id: I9ddf3842b7d19946876ac1a2375611e8c13bbb9a Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>bb10
parent
5582851c33
commit
f939c3728c
|
|
@ -237,7 +237,11 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i
|
|||
{
|
||||
Q_UNUSED(offset);
|
||||
|
||||
context->makeCurrent(window);
|
||||
if (!context->makeCurrent(window)) {
|
||||
qWarning("composeAndFlush: makeCurrent() failed");
|
||||
return;
|
||||
}
|
||||
|
||||
QOpenGLFunctions *funcs = context->functions();
|
||||
funcs->glViewport(0, 0, window->width() * window->devicePixelRatio(), window->height() * window->devicePixelRatio());
|
||||
funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue