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)
This commit is contained in:
parent
95e57339a9
commit
806873f9af
@ -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);
|
||||
|
||||
|
@ -78,6 +78,17 @@ QPaintDevice *QVGWindowSurface::paintDevice()
|
||||
void QVGWindowSurface::flush(QWidget *widget, const QRegion ®ion, 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user