summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-09-10 07:54:43 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-09-10 08:05:12 (GMT)
commitb664f8be580e252489d4db919ac660ecfe303e98 (patch)
tree7ad98a574df88884cc1b863e36a2bd414212d46b
parentf82cee5501d5c76aebe8475ff47b334962b42c21 (diff)
downloadQt-b664f8be580e252489d4db919ac660ecfe303e98.zip
Qt-b664f8be580e252489d4db919ac660ecfe303e98.tar.gz
Qt-b664f8be580e252489d4db919ac660ecfe303e98.tar.bz2
Don't waste memory on the share widget in the GL window surface.
Reviewed-by: Trond
-rw-r--r--src/opengl/qwindowsurface_gl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index e84bc29..48c7deb 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -190,7 +190,10 @@ public:
QGLWidget *shareWidget() {
if (!initializing && !widget && !cleanedUp) {
initializing = true;
- widget = new QGLWidget;
+
+ widget = new QGLWidget(QGLFormat(QGL::SingleBuffer | QGL::NoDepthBuffer | QGL::NoStencilBuffer));
+ widget->resize(1, 1);
+
// We dont need this internal widget to appear in QApplication::topLevelWidgets()
if (QWidgetPrivate::allWidgets)
QWidgetPrivate::allWidgets->remove(widget);