How to control FPS per window surface?

308 views Asked by At

In my program, there are QtWaylandCompositor which contains two windows for each screen.

WaylandCompositor {
  WaylandOutput  {
     window: Window {
       id: screen1
     }
  }
  WaylandOutput  {
     window: Window {
       id: screen2
     }
  }
}

I want to control the maximum FPS of each window surface. one screen performs max 30 FPS and another max 60 FPS. So I am looking for a solution like QT_QPA_UPDATE_IDLE_TIME not for the process but the window.


QPlatformWindow subclasses can re-implement this function to provide display refresh synchronized updates.

I am trying to reimplement QPlatformWindow::requestUpdate https://code.woboq.org/data/symbol.html?root=../qt5/&ref=_ZN15QPlatformWindow13requestUpdateEv, but I don't know how to put the customized QPlatformWindow class into QQuickWindow. https://code.woboq.org/qt5/qtbase/src/gui/kernel/qwindow.h.html#_ZNK7QWindow6handleEv

0

There are 0 answers