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

Main GUI thread serialises QOpenGLWidget::frameSwapped per VSync for multiple application windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.4.0 RC
    • GUI: OpenGL
    • None
    • Linux
    • 6462a454e (dev), 593d63b00 (6.5)

    Description

      On an application with multiple Windows containing QOpenGLWidgets (for example, in the sample 'threadedqopenglwidget' project provided in Qt/Examples/Qt-5.4/opengl/threadedqopenglwidget/), it seems that the signal 'QOpenGLWidget::frameSwapped' is emitted on a per-window serialised VSync mechanism. E.g. in the scenario where the display frequency is at 60Hz:

      Main app -> One window (two widgets each) - widgets update at 60Hz. QOpenGLWidget::frameSwapped is sent to Window 1's widgets.
      Main app -> Two windows (two widgets each) - widgets update at 30Hz. QOpenGLWidget::frameSwapped is sent to Window 1's widgets. Vsync occurs. QOpenGLWidget::frameSwapped is sent to Window 2's widgets.
      Main app -> Three windows (two widgets each) - widgets update at 15Hz. ...and so on

      This means that an app cannot have multiple windows updating on the same VSync using this mechanism.
      It looks like the main GUI thread is only emitting a QOpenGLWidget::frameSwapped per-window, per-VSync, not to all child windows per-VSync, causing them to visually stutter.

      By running the 'threadedqopenglwidget' sample this can be reproduced by noticing that the OpenGL widgets update rate increases as each window is closed.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            rasterblaster Jose Commins
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes