As described at [1], "QWindow supports rendering using
OpenGL [...]".
Using a QWindow for OpenGL rendering had been introduced
in
commit 56b19f9a81
Date: Fri Dec 14 12:44:20 2018 +0300
tdf#121247, tdf#121266 KDE5: Add basic support for OpenGL
, but then
commit 4366e06052
Date: Tue May 24 11:34:59 2022 +0200
tdf#148864 Qt switch QtObjectWindow to QWidget
had switched from QWindow to QWidget, and OpenGL slide
transitions like the "Tiles" one stopped working.
At least for qt6, which now uses QtMultimedia for video
playback (see the tdf#145735 commits), issues like tdf#148864
("Kubuntu 22.04 LTS LibreOffice Impress 7.3.3 Fails to Play Embedded
Videos") and tdf#125517 ("LO Impress: Can't stop presentation
with video and go to the next slide") related to video playback
appear to be no problem, so switch back to using QWindow there.
Explicitly set the window background to transparent
in `QtOpenGLContext::ImplInit`, as not doing so
caused slide content in presentation mode to not
be updated properly when testing with the attachment 183972
from tdf#149461 on Wayland.
(This was not an issue when running on XWayland, i.e.
with QT_QPA_PLATFORM=xcb).
With this in place, OpenGL transitions work with qt6.
With QT_QPA_PLATFORM=xcb, it looks all fine in my tests
on Debian testing.
With QT_QPA_PLATFORM=wayland, the slide text from attachment 183972
sometimes incorrectly showed up for a fraction of a second after
the slide transition finished, then disappeared again until
it was triggered to show as it should (e.g. by pressing the right
arrow key), s. screencast attachment 194899 in tdf#149461.
A multitude of warnings like the following are shown on stderr
in that case, which don't show up for xcb:
warn:vcl.opengl:47352:47352:vcl/source/opengl/OpenGLHelper.cxx:709: GL Error 0506 (invalid framebuffer operation) in file /home/michi/development/git/libreoffice/slideshow/source/engine/opengl/TransitionImpl.cxx at line 398
That looks like a separate issue to me, however which would
need further analysis.
Keep using the QtObjectWindow approach for qt5 to
not regress on video playback.
[1] https://doc.qt.io/qt-5/qtgui-index.html#opengl-and-opengl-es-integration
Change-Id: I6e1eb989254e2cbbfada6f719ee0518571df4c42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169347
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>