|author||Tor Arne Vestbø <firstname.lastname@example.org>||2013-04-30 12:33:02 +0200|
|committer||The Qt Project <email@example.com>||2013-04-30 23:30:52 +0200|
iOS: Don't pretend like our OpenGL context is single-buffered
Internally iOS double-buffers its rendering using copy instead of flipping, so we reported that our context was single-buffered so that clients could take advantage of the unchanged buffer. This failed when clients (such as Qt itself) then assumed that calling swapBufferes() was not needed. We now properly report that we're double-buffered, and we'll have to find another way to report the way double-buffering works if that's still an optimization we'd like to provide to clients. Change-Id: Id2e4faa68ed3b837ad01d6f22b2927fc9c9769c2 Reviewed-by: Richard Moe Gustavsen <firstname.lastname@example.org> Reviewed-by: Samuel Rødal <email@example.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioscontext.mm')
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm
index 9467cfdb42..807c75df54 100644
@@ -58,10 +58,11 @@ QIOSContext::QIOSContext(QOpenGLContext *context)
- // Even though iOS internally double-buffers its rendering, we
- // report single-buffered here since the buffer remains unchanged
- // when swapping unlesss you manually clear it yourself.
+ // iOS internally double-buffers its rendering using copy instead of flipping,
+ // so technically we could report that we are single-buffered so that clients
+ // could take advantage of the unchanged buffer, but this means clients (and Qt)
+ // will also assume that swapBufferes() is not needed, which is _not_ the case.