kwin/plugins
Vlad Zahorodnii 445d1496e4 Introduce persistent global share context
On Wayland, internal windows that use OpenGL are rendered into fbos,
which are later handed over to kwin. In order to achieve that, our QPA
creates OpenGL contexts that share resources with the scene's context.

The problems start when compositing has been restarted. If user changes
any compositing settings, the underlying render backend will be
reinitialized and with it, the scene's context will be destroyed. Thus,
we no longer can accept framebuffer objects from internal windows.

This change addresses the framebuffer object sharing problem by adding
a so called global share context. It persists throughout the lifetime of
kwin. It can never be made current. The scene context and all contexts
created in our QPA share resources with it.

Therefore we can destroy the scene OpenGL context without affecting
OpenGL contexts owned by internal windows, e.g. the outline visual or
tabbox.

It's worth noting that Qt provides a way to create a global share
context. But for our purposes it's not suitable since the share
context must be known when QGuiApplication attempts to instantiate a
QOpenGLContext object. At that moment, the backend is not initialized
and thus the EGLDisplay is not available yet.

BUG: 415798
(cherry picked from commit 292335beac)
2020-10-20 12:21:31 +00:00
..
idletime Prettify license headers 2020-08-07 19:57:56 +00:00
kdecorations SVN_SILENT made messages (.desktop file) - always resolve ours 2020-10-04 09:47:59 +02:00
kglobalaccel Prettify license headers 2020-08-07 19:57:56 +00:00
kpackage SVN_SILENT made messages (.desktop file) - always resolve ours 2020-10-04 09:47:59 +02:00
platforms scene: Reduce the call cost of Platform::supportsQpaContext() 2020-10-20 12:21:31 +00:00
qpa Introduce persistent global share context 2020-10-20 12:21:31 +00:00
scenes scene: Reduce the call cost of Platform::supportsQpaContext() 2020-10-20 12:21:31 +00:00
windowsystem plugins/windowsystem: Adjust installation path 2020-09-01 22:44:11 +03:00
CMakeLists.txt Cleanup style in CMakeLists.txt files 2019-09-17 16:03:05 +03:00