From f913859f88c5f032833f6eeb1c9c3066f4405a9a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 2 Apr 2012 14:34:36 -0700 Subject: eglfs: delete screen on exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Delete the screen when the integration gets deleted. The screen destructor destroys the window surface and terminates the egl connection. Note that the egl context is not destroyed since it is managed by QOpenGLContext. Change-Id: Ifb91c20edb6d5db684c37fb84d5ff40436f40925 Reviewed-by: Donald Carr Reviewed-by: Samuel Rødal --- src/plugins/platforms/eglfs/qeglfsscreen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/plugins/platforms/eglfs/qeglfsscreen.cpp') diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp index 000bedf293..fdffd96d6e 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp @@ -146,6 +146,14 @@ QEglFSScreen::QEglFSScreen(EGLNativeDisplayType display) eglSwapInterval(m_dpy, swapInterval); } +QEglFSScreen::~QEglFSScreen() +{ + if (m_surface) + eglDestroySurface(m_dpy, m_surface); + + eglTerminate(m_dpy); +} + void QEglFSScreen::createAndSetPlatformContext() const { const_cast(this)->createAndSetPlatformContext(); } -- cgit v1.2.3