summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-02-08 13:36:24 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:56:09 +0100
commit3eeb388b429242da8bfd9b9dc70660980f62090a (patch)
tree65e3c100aaeaaa50657d811fe49525cd7bfda058 /src
parent029029fa97b8f11b2384040f12dc1ca6b31e03a6 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/qiosbackingstore.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosbackingstore.mm b/src/plugins/platforms/ios/qiosbackingstore.mm
index 5ee048cb2f..566ff3a672 100644
--- a/src/plugins/platforms/ios/qiosbackingstore.mm
+++ b/src/plugins/platforms/ios/qiosbackingstore.mm
@@ -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);
}