diff options
author | Thomas Senyk <thomas.senyk@qt.io> | 2022-11-03 08:19:58 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-20 16:44:59 +0000 |
commit | 78586aef91ce78615cf4ec6277e0047d9034b588 (patch) | |
tree | e2211d7677c965439bd37150c08b523db9ee9e85 /configure.cmake | |
parent | f65e8537a801ed0028eac68a529b7638edc94a17 (diff) | |
download | qtwayland-78586aef91ce78615cf4ec6277e0047d9034b588.tar.gz |
QOpenGLContext re-creation - orphanedTextures
The texture clean-up in the HW-integration has
two issues when QOpenGLContext is re-created.
1. texture going out-of-date (QOpenGLContext::aboutToBeDestroyed)
and still being used/returned to be used
2. QOpenGLContext dies (QOpenGLContext::aboutToBeDestroyed)
while an "discarded" QOpenGLTexture (an orphan) isn't deleted yet.
(you can't delete a texture past it's ctx's QOpenGLContext::aboutToBeDestroyed)
This patch fixes both issues with a helper and a lambda on 3 HW-integration-backends:
wayland-egl, wayland-eglstream and linux-dmabuf
Fix for 1.:
Simple connection to a lambda that deletes the texture and removes them from the set of used textures.
Signal is QOpenGLContext::aboutToBeDestroyed
Fix for 2.:
A function in each backend: deleteSpecificOrphanedTexture(QOpenGLTexture *texture)
Also connected/called by QOpenGLContext::aboutToBeDestroyed
Deletes the texture (before deleteOrphanedTextures() does it too late)
and removes the dead pointer from the orphanage
Change-Id: Iccce8845bb669df93f1be43cbe9b9d25f7fd5235
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit baada964fa554bd06d6f8ce2d1afd88902ea73b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'configure.cmake')
0 files changed, 0 insertions, 0 deletions