Cocoa: Fix qmlscene flicker on startup.
authorMorten Sorvig <morten.sorvig@nokia.com>
Tue, 23 Aug 2011 10:51:11 +0000 (12:51 +0200)
committerGunnar Sletta <gunnar.sletta@nokia.com>
Wed, 31 Aug 2011 14:16:03 +0000 (16:16 +0200)
commit071914232189735ae6475d44d07f11f90b4729a1
treef749a96da620f6a4e9de74fbd09aa4d6c5d0adf1
parent090ee21eac7257644422e35395194e5fd7fb8efa
Cocoa: Fix qmlscene flicker on startup.

The SG render thread was racing window creation in
the GUI thread, which would cause flicker if the
window won the race and was shown before the SG
thread had a frame ready.

Send a synchronous expose event before showing the
window - this will wait for the SG render thread.

In addition, don't defer NSwindow creation. The GL
context setup is done before the window is shown
and needs a fully created window.

New API: QWindowSystemInterface::handleSynchronousExposeEvent
Retire: QWindowSystemInterface::handleExposeEvent

Change-Id: I0bb46089d16ec4882aaac8db67b57d15e0f51531
Reviewed-on: http://codereview.qt.nokia.com/3399
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
src/gui/kernel/qwindowsysteminterface_qpa.cpp
src/gui/kernel/qwindowsysteminterface_qpa.h
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/wayland/qwaylandwindow.cpp
src/plugins/platforms/windows/qwindowswindow.cpp
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbwindow.cpp