diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-06-08 17:04:21 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-10 08:17:56 +0000 |
commit | 89fc92b9a778ad833bfa319c6db370d12f49abef (patch) | |
tree | 82e61be01f2a24a3763ddb74eb76d3fc358cce3a | |
parent | bed5306eaf91b219c27ea7c2966519aa79e44039 (diff) |
Fix inexplicably changed condition in GL backingstore composition
In a13e8d6660913bec172d1374f78083498c539df0 which provided the move
and decoupling of OpenGL code the !makeCurrent-succeeded &&
!context-is-valid condition got changed to !makeCurrent-succeeded &&
context-is-valid which makes no sense because what we test for is
context lost situations, in which case makeCurrent fails and isValid()
reports false.
Restore the ! that went missing in the above mentioned patch.
Change-Id: I94f84d2853bcbd2965f76ecd665d3614b1f0e746
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit c6c6e01e893b211f51511929b4258f789cdfd428)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/opengl/qplatformbackingstoreopenglsupport.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qplatformbackingstoreopenglsupport.cpp b/src/opengl/qplatformbackingstoreopenglsupport.cpp index 46e36c23d4..30532c5b4b 100644 --- a/src/opengl/qplatformbackingstoreopenglsupport.cpp +++ b/src/opengl/qplatformbackingstoreopenglsupport.cpp @@ -174,7 +174,8 @@ void QPlatformBackingStoreOpenGLSupport::composeAndFlush(QWindow *window, const bool current = context->makeCurrent(window); - if (!current && context->isValid()) { + if (!current && !context->isValid()) { + // release resources and attempt to reinitialize upon context loss delete blitter; blitter = nullptr; textureId = 0; |