QNX: Make sure calls to (create/destroy)Surface are symmetric
As a matter of fact also reduces state duplication with QQnxWindow by getting rid of m_surfaceSize. Change-Id: I47f5af0f00a317d3bb246c0c9161e2219fbd3263 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
This commit is contained in:
parent
20a52687ec
commit
b283213712
@ -317,8 +317,7 @@ void QQnxGLContext::createSurface(QPlatformSurface *surface)
|
||||
// buffers of the proper size
|
||||
if (!platformWindow->hasBuffers()) {
|
||||
platformWindow->setPlatformOpenGLContext(this);
|
||||
m_surfaceSize = platformWindow->geometry().size();
|
||||
platformWindow->setBufferSize(m_surfaceSize);
|
||||
platformWindow->setBufferSize(platformWindow->geometry().size());
|
||||
}
|
||||
|
||||
// Obtain the native handle for our window
|
||||
@ -351,6 +350,8 @@ void QQnxGLContext::destroySurface()
|
||||
qFatal("QQNX: failed to destroy EGL surface, err=%d", eglGetError());
|
||||
}
|
||||
}
|
||||
|
||||
m_eglSurface = EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -83,7 +83,6 @@ private:
|
||||
EGLConfig m_eglConfig;
|
||||
EGLContext m_eglContext;
|
||||
EGLSurface m_eglSurface;
|
||||
QSize m_surfaceSize;
|
||||
|
||||
static EGLint *contextAttrs();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user