kwin/plugins/platforms/drm
Martin Gräßlin 9d7ef58b2b Support restarting the OpenGL compositor on Wayland
Summary:
KWin needs to support restarting the OpenGL compositor in case of a
graphics reset event.

On Wayland the tricky part is that the applications should not notice
this. Most importantly KWin cannot just destroy the EGLDisplay and create
a new one. But this is how a restart works: the complete compositor gets
torn down and recreated - including the EGLDisplay.

This change moves ownership of the EGLDisplay to the Platform.
The AbstractEglBackend subclasses query the Platform whether there is
already an EGLDisplay. Only if there is no EGLDisplay the EGLDisplay is
created and only if no EGLDisplay is registered with Wayland the bind
is performed.

Another change is regarding the destruction: the AbstractEglDisplay does
no longer unbind the Wayland display and does no longer destroy the
EGLDisplay. The EGLDisplay is destroyed by the Platform - so very late
on application exit. The Wayland display is unbound when the Compositor
terminates.

Test Plan:
Limited testing with the added auto-test. This one needs to
be extended to fully verify that OpenGL applications continue to work.
But this requires build.kde.org to support OpenGL on Wayland.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2202
2016-07-20 14:08:23 +02:00
..
CMakeLists.txt Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
drm.json Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
drm_backend.cpp [platforms/drm] Properly handle case that mapping the blank buffer fails 2016-07-13 09:37:38 +02:00
drm_backend.h [platforms/drm] Only show cursor if a pointer device is available 2016-05-25 12:14:00 +02:00
drm_buffer.cpp [platforms/drm] Add better warnings in DrmBuffer if things fail 2016-07-15 08:37:17 +02:00
drm_buffer.h Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
drm_inputeventfilter.cpp Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
drm_inputeventfilter.h Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
drm_output.cpp [platforms/drm] Properly handle case that mapping the blank buffer fails 2016-07-13 09:37:38 +02:00
drm_output.h [platforms/drm] Properly handle case that mapping the blank buffer fails 2016-07-13 09:37:38 +02:00
drm_pointer.h Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
egl_gbm_backend.cpp Support restarting the OpenGL compositor on Wayland 2016-07-20 14:08:23 +02:00
egl_gbm_backend.h Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
logging.cpp Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
logging.h Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
scene_qpainter_drm_backend.cpp [plugins/drm] Drop dependency on VirtualTerminal 2016-04-22 14:18:56 +02:00
scene_qpainter_drm_backend.h add override to bufferForScreen 2016-05-02 14:50:23 +02:00
screens_drm.cpp Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00
screens_drm.h Move backends/ to plugins/platforms/ 2016-04-12 08:01:27 +02:00