• Alan Alpert's avatar
    Set incubation controller when a Window{} is loaded via QQmlApplicationEngine · 9d75626b
    Alan Alpert authored
    
    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>
    9d75626b