Commit 9d75626b authored by Alan Alpert's avatar Alan Alpert Committed by The Qt Project
Browse files

Set incubation controller when a Window{} is loaded via QQmlApplicationEngine


This was the one convenience that was lost when transitioning templates
from QQuickView + Item{} to QQmlApplicationEngine + Window{}.

As the default window incubation controller was tied to the first
window's frameSwapped, we could easily run into a situation where
a secondary window required incubation while the first window
was idle. This would then starve the incubation controller. Instead
make it so that the renderloop emits "timeToIncubate" once it
is done with a renderpass over all windows, so the incubator
gets to run once and exactly once per vsync when animating.

The incubator logic was also flawed in that it could post
a lot of events to itself as a result of incubatingObjectCountChanged
and thus starve system events while processing incubation requests.
Now we start a timer and don't start it again until we have
completed an incubation pass.

Task-number: QTBUG-31203
Change-Id: Iea9e2c81efb46bb7875c70ccda0cdc4b3b3e58e7
Reviewed-by: default avatarAlan Alpert <aalpert@blackberry.com>
Reviewed-by: default avatarGunnar Sletta <gunnar.sletta@digia.com>
parent cfd4bf9d
No related merge requests found
Showing with 84 additions and 27 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment