Commit 6879c31
committed
perf: render RV viewport as a native GL window to fix Qt6 web-panel latency
The Qt6/PySide6 migration regressed the JS->Python QWebChannel bridge in
docked QWebEngineView panels: pyevaluate round-trips grew unbounded (into the
seconds) while media plays, where Qt5 stayed flat (~8 ms). Root cause is the
per-presented-frame ~80-90 ms full-window QOpenGLWidget composite, which
serializes on the GUI thread and starves QWebChannel delivery. The two prior
fixes (edit-mode churn skip, settle-window removal) only address the
non-playing path, so the regression persisted whenever a handler started
playback.
Render the RV viewport as a native QOpenGLWindow (new GLWindow) embedded via
QWidget::createWindowContainer, instead of a QOpenGLWidget:
- The top-level QMainWindow is no longer forced onto the OpenGL RHI backend,
so docked QWebEngineView panels render on the platform-default backend and
QT_QUICK_BACKEND=software is no longer needed (removed).
- The viewport presents on its own surface, off the full-window widget
composite, so playback no longer starves the bridge. Bridge latency stays
flat and self-healing while playing.
GLView becomes a plain QWidget host that delegates the API RV expects to the
GLWindow; QTGLVideoDevice gains a window-backed path alongside the widget one.
Also fixed, exposed by the surface change:
- Presentation / second output: DesktopVideoDevice::open no longer dereferences
the control device's (now-null) QOpenGLWidget; ScreenView shares a
QOpenGLContext via new backing-agnostic QTGLVideoDevice::glShareContext()/
glSurfaceFormat().
- Set Qt::AA_ShareOpenGLContexts (documented QtWebEngine requirement) so the
second-output and upload-worker GL surfaces share with the viewport, and drop
a null-context dereference in newSharedContextWorkerDevice that crashed when
Multithread GPU Upload was enabled.
- The UI blocking overlay is reworked from a raster child widget into a
frameless translucent top-level window so it can dim and block input over the
native viewport.
Validated on Windows (release): flat bridge latency under playback spam, all
web panels render docked, and viewport/events/drag-drop/annotations/
presentation/blocking-overlay all work. macOS and HDPI passes still pending.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>1 parent ccd7094 commit 6879c31
14 files changed
Lines changed: 787 additions & 850 deletions
File tree
- docs/rv-manuals/rv-reference-manual
- src
- bin/apps/rv
- lib/app
- RvCommon
- RvCommon
- py_rvui/rv
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
360 | 367 | | |
361 | 368 | | |
362 | 369 | | |
| |||
369 | 376 | | |
370 | 377 | | |
371 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
372 | 387 | | |
373 | 388 | | |
374 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
| 750 | + | |
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
| 754 | + | |
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
| 767 | + | |
768 | 768 | | |
769 | | - | |
| 769 | + | |
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| |||
0 commit comments