summaryrefslogtreecommitdiffstats
path: root/src/openvg/qwindowsurface_vgegl.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-08-30 23:56:12 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-08-30 23:56:12 (GMT)
commitbe1140bf0040963b50a5b80be123245c98833b96 (patch)
tree559bb87a14acfa1b651a9c9effeab84c259d1c9b /src/openvg/qwindowsurface_vgegl.cpp
parentd23863952b0c13ccd8b2989d24153d94b3d3f83d (diff)
downloadQt-be1140bf0040963b50a5b80be123245c98833b96.zip
Qt-be1140bf0040963b50a5b80be123245c98833b96.tar.gz
Qt-be1140bf0040963b50a5b80be123245c98833b96.tar.bz2
Destroy EGL window surface when direct VG surface is deleted
OpenVG window surfaces were leaking because the QVGEGLWindowSurfaceDirect destructor was previously not cleaning up the EGLSurface object. Reviewed-by: trustme
Diffstat (limited to 'src/openvg/qwindowsurface_vgegl.cpp')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index ae91bb2..ba711b7 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -618,6 +618,12 @@ QVGEGLWindowSurfaceDirect::QVGEGLWindowSurfaceDirect(QWindowSurface *win)
QVGEGLWindowSurfaceDirect::~QVGEGLWindowSurfaceDirect()
{
+ destroyPaintEngine();
+ if (context) {
+ if (windowSurface != EGL_NO_SURFACE)
+ qt_vg_destroy_surface(context, windowSurface);
+ qt_vg_destroy_context(context);
+ }
}
QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)