From 806873f9af8b8ab4d70ec8779bc780315e8aca1d Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 2 May 2011 12:22:24 +0300 Subject: Fix for native child widget performance issue. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/opengl/qwindowsurface_gl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/opengl') 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) return; +#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; + } +#endif + + QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget(); Q_ASSERT(parent); -- cgit v1.2.3