Details
-
Technical task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
That is most likely not compatible with `WS_EX_NOREDIRECTIONBITMAP`, which is essential for people who want to have transparent `QQuickWindow` with the RHI D3D11/D3D12 backend (and also for people who don't want to have redirection surface for other reasons, including performance gain).vestbo I'm not sure if that is a good idea. That is most likely not compatible with `WS_EX_NOREDIRECTIONBITMAP`, which is essential for people who want to have transparent `QQuickWindow` with the RHI D3D11/D3D12 backend (and also for people who don't want to have redirection surface for other reasons, including performance gain).
Edit Delete
vestbo added a comment - 1 hour ago
Could you file a spin-off issue from this one where you describe this in more detail, and ideally attach a sample that shows the problem?fuzun Could you file a spin-off issue from this one where you describe this in more detail, and ideally attach a sample that shows the problem? CC wladimir.leuschner Thanks!
vestbo I have not yet confirmed the issue, and unfortunately I'm not sure when I can do that. However, checking it should be trivial, simply have the environment variable `QT_QPA_DISABLE_REDIRECTION_SURFACE` set before the main window is created (`QWindow::create()`) (and disable it afterwards). Note that standard `QWidget` windows don't use D3D as far as I know, so `QQuickWindow` should be used to check.
When `WS_EX_NOREDIRECTIONBITMAP` is used, `QMenu` (a `QWidget` window) are not displayed, for example. That's why I assume the same problematic scenario with what is done currently.
At the same time, this is only for the problem itself. In ideal case `QPainter` should not be unconditionally used regardless, and there should not be a child transparent window at the same time.
Child transparent window needs to be layered and that is bad for performance. I think `QWindow` surface type should be checked, and `QRhi` / `QBackingStore` (`QPainter`) should be used based on the surface type to draw on top of the window.
`QWindow` has `QWindow::paintEvent(QPaintEvent *ev)`, and `QQuickWindow` has `QQuickWindow::afterRenderPassRecording()`. It seems that it should be possible to have overlay (which can be transparent) this way.