diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-23 07:18:39 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-23 10:29:37 +0200 |
commit | 5cfb80a28ef6bf6820c970a6c355e6879021e46e (patch) | |
tree | e60f1f43e9670e82923e3c2d0d19b29198b9c300 /src/plugins/platforms/ios/qioswindow.mm | |
parent | 930e750b7aca024b839c9856cfcc79aab8c0abbc (diff) | |
parent | f4be16e1f7828a0f6992ef2e20b9106177d7fc88 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/angle/src/libGLESv2/libGLESv2.pro
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r-- | src/plugins/platforms/ios/qioswindow.mm | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index fb2fd2b946..ddf856d7a4 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -223,26 +223,7 @@ void QIOSWindow::applyGeometry(const QRect &rect) bool QIOSWindow::isExposed() const { - // Note: At startup of an iOS app it will enter UIApplicationStateInactive - // while showing the launch screen, and once the application returns from - // applicationDidFinishLaunching it will hide the launch screen and enter - // UIApplicationStateActive. Technically, a window is not exposed until - // it's actually visible on screen, and Apple also documents that "Apps - // that use OpenGL ES for drawing must not use didFinishLaunching to - // prepare their drawing environment. Instead, defer any OpenGL ES - // drawing calls to applicationDidBecomeActive". Unfortunately, if we - // wait until the applicationState reaches ApplicationActive to signal - // that the window is exposed, we get a lag between hiding the launch - // screen and blitting the first pixels of the application, as Qt - // spends some time drawing those pixels in response to the expose. - // In practice there doesn't seem to be any issues starting GL setup - // and drawing from within applicationDidFinishLaunching, and this is - // also the recommended approach for other 3rd party GL toolkits on iOS, - // so we 'cheat', and report that a window is exposed even if the app - // is in UIApplicationStateInactive, so that the startup transition - // between the launch screen and the application content is smooth. - - return qApp->applicationState() > Qt::ApplicationHidden + return qApp->applicationState() >= Qt::ApplicationActive && window()->isVisible() && !window()->geometry().isEmpty(); } |