Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55778

requestAnimationFrame() invoked too often

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.9.0 Alpha
    • 5.7.0, 5.8.0
    • Quick: SceneGraph
    • None
    • Ubuntu 14.04

      The following code invokes the crank() callback many tens of times per millisecond, and prevents any other content from showing in the application (e.g. the "Hi Mom!" text).

      import QtQuick 2.7
      import QtQuick.Window 2.2
      Window {
          visible:true; width:100; height:100
          Text { text:"Hi Mom!" }
          Canvas {
              anchors.fill:parent
              Component.onCompleted: crank()
              function crank(){
                  console.log(+new Date)
                  requestAnimationFrame(crank)
              }
          }
      }
      

      It appears that requestAnimationFrame() is broken and useless.

        For Gerrit Dashboard: QTBUG-55778
        # Subject Branch Project Status CR V

            janichol Andy Nichols
            phrogz Gavin Kistner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes