summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-05-02 12:22:24 +0300
committerJani Hautakangas <jani.hautakangas@nokia.com>2011-05-02 12:45:11 +0300
commit6a92de7c89764848f7a85b1aa412a07bedc72b1a (patch)
tree8037df739702167f5d696dab9d18036bee4a0bba /src/openvg
parenta690e560b38385ebb9cd83288e8660d2a4ca2fde (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
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 9ce7f9a210..01a6ce92a3 100644
--- a/src/openvg/qwindowsurface_vg.cpp
+++ b/src/openvg/qwindowsurface_vg.cpp
@@ -79,6 +79,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);
}