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

requestAnimationFrame() invoked too often

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes