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

Eglfs: optimize screen capturing with QWidgets

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5, 6.6, 6.7, 6.8
    • Multimedia
    • None
    • Linux/Yocto
    • 342ae435a (dev), d33437c4f (6.7), e544c665d (6.6), 56f9a5248 (tqtc/lts-6.5), 828b4ab8d (dev), c31fcb1e6 (6.7), 0b41f67f3 (tqtc/lts-6.5)
    • Multimedia Wk 13-14

    Description

      The current implementation of the screen capture takes too much CPU and slow-down the UI. Taking a single frame takes around 65ms

      The factors causing the performance problems.

      • The capturing goes in the main thread because of OpenGL restrictions (the opengl compositor cannot write the content to FBO in another thread).
      • Currently, we use CPU implementation, calling fbo.toImage(), which consists of 2 steps: downloading from the texture, and flipping.

      Possible optimizations
      1. retain opengl texture (fbo) in the video buffer and lazily (by the 1st request) map to memory (convert with no flipping). The approach needs to implement thread-dependent OpenGL context, and make the recorder able to handle transformed frames. This approach depends on https://bugreports.qt.io/browse/QTBUG-121832.
      2. find a way to flip the texture by OpenGL.

      Attachments

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

        Activity

          People

            mikko.hallamaa Mikko Hallamaa
            artemiy Artem Dyomin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: