summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-05-02 12:22:24 +0300
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:53 +0200
commit806873f9af8b8ab4d70ec8779bc780315e8aca1d (patch)
treec6a782d5397e6ed64be24ebc741085c5e13b9f16 /src/openvg
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/openvg')
-rw-r--r--src/openvg/qwindowsurface_vg.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp
index eedfea51fd..31ccc1cf2f 100644
--- a/src/openvg/qwindowsurface_vg.cpp
+++ b/src/openvg/qwindowsurface_vg.cpp
@@ -78,6 +78,17 @@ QPaintDevice *QVGWindowSurface::paintDevice()
void QVGWindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &offset)
{
Q_UNUSED(offset);
+
+#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();
d_ptr->endPaint(parent, region);
}