Tear down properly in kms plugin when exiting
Change-Id: Idad060af4a8b4e68c2312cc2b69de39d2a58a1c4 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
parent
504c2cb1e1
commit
7142e8bd23
@ -71,6 +71,7 @@ QKmsScreen::QKmsScreen(QKmsDevice *device, int connectorId)
|
||||
m_depth(32),
|
||||
m_format(QImage::Format_Invalid),
|
||||
m_refreshTime(16000),
|
||||
m_eglWindowSurface(EGL_NO_SURFACE),
|
||||
m_modeSet(false)
|
||||
{
|
||||
m_cursor = new QKmsCursor(this);
|
||||
@ -80,6 +81,13 @@ QKmsScreen::QKmsScreen(QKmsDevice *device, int connectorId)
|
||||
QKmsScreen::~QKmsScreen()
|
||||
{
|
||||
delete m_cursor;
|
||||
drmModeSetCrtc(m_device->fd(), m_oldCrtc->crtc_id, m_oldCrtc->buffer_id,
|
||||
m_oldCrtc->x, m_oldCrtc->y,
|
||||
&m_connectorId, 1, &m_oldCrtc->mode);
|
||||
drmModeFreeCrtc(m_oldCrtc);
|
||||
if (m_eglWindowSurface != EGL_NO_SURFACE)
|
||||
eglDestroySurface(m_device->eglDisplay(), m_eglWindowSurface);
|
||||
gbm_surface_destroy(m_gbmSurface);
|
||||
}
|
||||
|
||||
QRect QKmsScreen::geometry() const
|
||||
|
Loading…
Reference in New Issue
Block a user