summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens.qnx@kdab.com>2012-05-22 13:07:13 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-24 14:47:14 +0200
commitb2832137129f4c7b66eadffb8b8aeee8486ac73b (patch)
tree1ded0867bb55e6d3f77dd4d85a9a9d1a8a3d198c /src/plugins/platforms/qnx
parent20a52687ecca534c494b82254b7fc021558ea603 (diff)
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>
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp5
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 934e6afedf..0b333ea728 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -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
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.h b/src/plugins/platforms/qnx/qqnxglcontext.h
index 8b587e7eb8..219c48f8b3 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.h
+++ b/src/plugins/platforms/qnx/qqnxglcontext.h
@@ -83,7 +83,6 @@ private:
EGLConfig m_eglConfig;
EGLContext m_eglContext;
EGLSurface m_eglSurface;
- QSize m_surfaceSize;
static EGLint *contextAttrs();
};