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

QML Canvas item doesn't update more than once if the Canvas is the only non-static Item in the Scene

    XMLWordPrintable

Details

    • a32ee8627348317befa455537c2437805ff14e0e

    Description

      A Scene using Canvas, and context2D is updated by a timer, and there are no other QML items that are being updated, then the SceneGraph is never marked changed.

      Updates will be applied if another window is placed on top and moved, or if a control is added to the scene and it is marks the SceneGraph changed.

      I believe the issue is that the Canvas dirty flags are all cleared when it is rendered into the backing image, and the updatePaintNode code is only checking if the texture address has changed in order to determine if the scene must be rendered.

      In the example below, if the Text Item (below the Canvas Item in badcanvas-good.qml) changes its contents, then the Scene is marked changed, and the Canvas updates are rendered.

      Attachments

        1. badcanvas.js
          0.4 kB
          Barry Silverman
        2. badcanvas.qml
          1 kB
          Barry Silverman
        3. badcanvas-good.qml
          1 kB
          Barry Silverman
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            trebonian Barry Silverman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes