kwin/plugins/qpa
Vlad Zahorodnii 292335beac 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
2020-10-19 12:13:15 +03:00
..
backingstore.cpp Prettify license headers 2020-08-07 19:57:56 +00:00
backingstore.h qpa: Merge OpenGL platform context classes 2020-10-13 05:32:48 +00:00
CMakeLists.txt qpa: Merge OpenGL platform context classes 2020-10-13 05:32:48 +00:00
eglhelpers.cpp Prettify license headers 2020-08-07 19:57:56 +00:00
eglhelpers.h Prettify license headers 2020-08-07 19:57:56 +00:00
eglplatformcontext.cpp Introduce persistent global share context 2020-10-19 12:13:15 +03:00
eglplatformcontext.h qpa: Merge OpenGL platform context classes 2020-10-13 05:32:48 +00:00
integration.cpp Introduce persistent global share context 2020-10-19 12:13:15 +03:00
integration.h qpa: remove unused override for the inputcontext 2020-09-03 12:29:57 +00:00
kwin.json
main.cpp Prettify license headers 2020-08-07 19:57:56 +00:00
offscreensurface.cpp qpa: Merge OpenGL platform context classes 2020-10-13 05:32:48 +00:00
offscreensurface.h qpa: Merge OpenGL platform context classes 2020-10-13 05:32:48 +00:00
platformcursor.cpp Prettify license headers 2020-08-07 19:57:56 +00:00
platformcursor.h Prettify license headers 2020-08-07 19:57:56 +00:00
screen.cpp qpa: Expose output names to QScreen 2020-09-23 06:36:31 +00:00
screen.h qpa: Expose output names to QScreen 2020-09-23 06:36:31 +00:00
window.cpp qpa: Create a pbuffer for internal windows 2020-10-19 06:12:13 +00:00
window.h qpa: Create a pbuffer for internal windows 2020-10-19 06:12:13 +00:00