<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Plasma on Wayland.<br />Restricted Application added subscribers: kwin, plasma-devel.<br />Restricted Application added projects: Plasma on Wayland, KWin.</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2202" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>KWin needs to support restarting the OpenGL compositor in case of a<br />
graphics reset event.</p>
<p>On Wayland the tricky part is that the applications should not notice<br />
this. Most importantly KWin cannot just destroy the EGLDisplay and create<br />
a new one. But this is how a restart works: the complete compositor gets<br />
torn down and recreated - including the EGLDisplay.</p>
<p>This change moves ownership of the EGLDisplay to the Platform.<br />
The AbstractEglBackend subclasses query the Platform whether there is<br />
already an EGLDisplay. Only if there is no EGLDisplay the EGLDisplay is<br />
created and only if no EGLDisplay is registered with Wayland the bind<br />
is performed.</p>
<p>Another change is regarding the destruction: the AbstractEglDisplay does<br />
no longer unbind the Wayland display and does no longer destroy the<br />
EGLDisplay. The EGLDisplay is destroyed by the Platform - so very late<br />
on application exit. The Wayland display is unbound when the Compositor<br />
terminates.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Limited testing with the added auto-test. This one needs to<br />
be extended to fully verify that OpenGL applications continue to work.<br />
But this requires build.kde.org to support OpenGL on Wayland.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKWIN KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>restart-opengl-compositor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2202" rel="noreferrer">https://phabricator.kde.org/D2202</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>abstract_egl_backend.cpp<br />
abstract_egl_backend.h<br />
autotests/integration/CMakeLists.txt<br />
autotests/integration/scene_opengl_test.cpp<br />
composite.cpp<br />
platform.cpp<br />
platform.h<br />
plugins/platforms/drm/egl_gbm_backend.cpp<br />
plugins/platforms/hwcomposer/egl_hwcomposer_backend.cpp<br />
plugins/platforms/virtual/egl_gbm_backend.cpp<br />
plugins/platforms/wayland/egl_wayland_backend.cpp<br />
plugins/platforms/x11/common/eglonxbackend.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma on Wayland<br /><strong>Cc: </strong>plasma-devel, kwin, hardening, jensreuterberg, abetts, sebas<br /></div>