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

qml animation blocked

    XMLWordPrintable

Details

    Description

      Hi:
      I write a simple qml animation and run it on platform wayland,

      I find the animation can't stop in the right place. The "shift" is about "8.177" when the animation stopped which the right value should be about "0". I think the last frame maybe skipped.
      I run the qml on platform eglfs。 The animation stops rightly.
      I enable QSG_RENDER_TIMING=1 and get the log in the attachment.
      I read the code QSGAnimationDriver::advance(). I use the default vsyncmode. But my really fps is about 30fps.
      My wayland client buffer count is 2. The QWaylandGLContext::swapBuffers will return soon. So the animation timer may think my fps is 60. I want to ask how to reslove this problem on platform wayland or some debug advices? Thank you.

      I also try QSG_FIXED_ANIMATION_STEP=1, but it still have the same problem. I know Qt5.4.1 is change something about animation compared with Qt5.2.1. Does it affect?
      The qml case:
      import QtQuick 2.0
      Rectangle {
      id: root
      width: 600
      height: 600
      color: "blue"
      property real shift: 0
      Rectangle

      { id: tt x:20 + shift y:20 width: 100 height: 100 color: "red" }

      Rectangle

      { id:t2 x:140 - shift y:20 width: 100 height:120 color: "yellow" }

      MouseArea

      { anchors.fill: parent onClicked: anima.start() }

      SequentialAnimation on shift {
      id: anima
      SequentialAnimation {

      NumberAnimation

      {to: 120; duration: 100; easing.type: Easing.InOutSine }

      NumberAnimation

      {to: 0; duration: 100; easing.type: Easing.InOutSine }

      loops: 1
      }
      }
      Text

      { text: "shift: " + shift }

      }

      Attachments

        1. qmllog
          6 kB
          zoulan

        Activity

          People

            sletta Gunnar Sletta
            zoulan zoulan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: