path: root/src/opengl
diff options
authorJani Hautakangas <>2011-05-02 12:22:24 +0300
committerOlivier Goffart <>2011-05-10 12:54:53 +0200
commit806873f9af8b8ab4d70ec8779bc780315e8aca1d (patch)
treec6a782d5397e6ed64be24ebc741085c5e13b9f16 /src/opengl
parent95e57339a9c02943edbd0cc7d4470a2ed044a7c2 (diff)
Fix for native child widget performance issue.
Flushing native child widgets in VG and GL window surfaces caused performance downgrade because unnecessary swapBuffers calls. On Symbian we must not support flushing native child widgets in VG and GL window surfaces because it causes GPU memory overhead and performance issues. Symbian graphics architecture allows us to render native child widgets to TLW EGL surface correctly in most of the cases. Task-number: QTMOBILITY-1570 Reviewed-by: Samuel Rødal (cherry picked from commit 6a92de7c89764848f7a85b1aa412a07bedc72b1a)
Diffstat (limited to 'src/opengl')
1 files changed, 11 insertions, 0 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 56e2c3b517..a4f581b0c0 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -610,6 +610,17 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
if (!d_ptr->destructive_swap_buffers && !d_ptr->did_paint)
+#ifdef Q_OS_SYMBIAN
+ if (window() != widget) {
+ // For performance reasons we don't support
+ // flushing native child widgets on Symbian.
+ // It breaks overlapping native child widget
+ // rendering in some cases but we prefer performance.
+ return;
+ }
QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget();