diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-10-24 17:51:08 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@digia.com> | 2012-10-24 18:01:57 +0200 |
commit | 20b9aa15dcbcf9e76204976a16061bf133b47999 (patch) | |
tree | 0ba76adfb3d6f32ed97b4108f6162ef8294a45da /src/compositor/wayland_wrapper/wlsurfacebuffer.h | |
parent | 3a192e2ef2d27e8b4a0b1b3e8d2f409d34a9e2bf (diff) |
Prevent leaking texture ids.
We need to call glDeleteTextures() in the correct thread (and when the
correct context is current). Luckily, QOpenGLSharedResourceGuard is
designed to solve that problem.
Change-Id: Ifc04fb9040ef82947189b098e1e1c4c8d787551f
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/wlsurfacebuffer.h')
-rw-r--r-- | src/compositor/wayland_wrapper/wlsurfacebuffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compositor/wayland_wrapper/wlsurfacebuffer.h b/src/compositor/wayland_wrapper/wlsurfacebuffer.h index 3ae351ae6..141fc4ca9 100644 --- a/src/compositor/wayland_wrapper/wlsurfacebuffer.h +++ b/src/compositor/wayland_wrapper/wlsurfacebuffer.h @@ -43,6 +43,7 @@ #include <QtCore/QRect> #include <QtGui/qopengl.h> +#include <QtGui/private/qopenglcontext_p.h> #include <qpa/qplatformscreenpageflipper.h> #include <wayland-server.h> @@ -117,6 +118,7 @@ private: bool m_is_displayed; #ifdef QT_COMPOSITOR_WAYLAND_GL GLuint m_texture; + QOpenGLSharedResourceGuard *m_guard; #else uint m_texture; #endif |