• Kai Koehne's avatar
    QmlProfiler: Make sure UI is properly rendered · 33ac7e44
    Kai Koehne authored
    Do the QML based painting when requested inside the UI thread, and
    only copy the final canvas pixmap in the renderer thread (in paint()).
    To avoid excessive re-drawing delay the painting via a timer to the
    next event loop run.
    
    The previous logic was still from Qt Quick 1 times, where the paint()
    method was called in the GUI thread. This has changed in Qt Quick 2:
    Here the paint() method will be called (on Unix) in a separate renderer
    thread, making the drawRegion / onDrawRegion connections implicitly
    deferred.
    
    Change-Id: I298547013658e4cd1e94115305577bdb96cd0b2a
    Reviewed-by: default avatarUlf Hermann <ulf.hermann@digia.com>
    Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
    33ac7e44
qdeclarativecontext2d.cpp 32.7 KB