iOS: Skip flushing child windows in QIOSBackingStore

We skip flushing raster-based child windows, to avoid the extra cost
of copying from the parent FBO into the child FBO. Since the child
is already drawn inside the parent FBO, it will become visible when
flushing the parent. The only case we end up not supporting is if the
child window overlaps a sibling window that's draws using a separate
QOpenGLContext.

Change-Id: Ib10414f4494747e5fe67f84b06575fe16ffddf96
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
bb10
Richard Moe Gustavsen 2013-02-08 13:36:24 +01:00 committed by Tor Arne Vestbø
parent 029029fa97
commit 3eeb388b42
1 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,13 @@ void QIOSBackingStore::flush(QWindow *window, const QRegion &region, const QPoin
Q_UNUSED(region);
Q_UNUSED(offset);
if (window != this->window()) {
// We skip flushing raster-based child windows, to avoid the extra cost of copying from the
// parent FBO into the child FBO. Since the child is already drawn inside the parent FBO, it
// will become visible when flushing the parent. The only case we end up not supporting is if
// the child window overlaps a sibling window that's draws using a separate QOpenGLContext.
return;
}
m_context->swapBuffers(window);
}