47343fb8f7
Summary: The gbm_surface is owned by the EglGbmBackend, but it's not the only one using it. The DrmSurfaceBuffer is also using it and needs it to destroy the gbm_bo. Now this can become a problem in the following situation: * a page flip is still pending * the EglGbmBackend destroys the gbm_surface -> when the page flip happens the DrmSurfaceBuffer will try to destroy the gbm_bo and crash as the gbm_surface is no longer valid. This situation can happen when switching screens or when switching compositing backend (OpenGL 2 -> OpenGL 3). To address this problem a class GbmSurface is added which wrapps the gbm_surface pointer. The EglGbmBackend creates and holds a shared pointer to the GbmSurface and passes that one to the DrmSurfaceBuffer. So when cleaning up the gbm_surface only the shared pointer is reset and in case the DrmSurfaceBuffer still needs it, it can access it without problems. BUG: 385372 FIXED-IN: 5.11.0 Test Plan: Not yet Reviewers: #kwin, #plasma, subdiff Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D8152 |
||
---|---|---|
.. | ||
integration | ||
libinput | ||
libkwineffects | ||
libxrenderutils | ||
tabbox | ||
abstract_client.h | ||
client.h | ||
CMakeLists.txt | ||
fakeeffectplugin.cpp | ||
fakeeffectplugin.json | ||
fakeeffectplugin_version.cpp | ||
fakeeffectplugin_version.json | ||
mock_abstract_client.cpp | ||
mock_abstract_client.h | ||
mock_client.cpp | ||
mock_client.h | ||
mock_effectshandler.cpp | ||
mock_effectshandler.h | ||
mock_screens.cpp | ||
mock_screens.h | ||
mock_workspace.cpp | ||
mock_workspace.h | ||
onscreennotificationtest.cpp | ||
onscreennotificationtest.h | ||
opengl_context_attribute_builder_test.cpp | ||
test_builtin_effectloader.cpp | ||
test_client_machine.cpp | ||
test_gbm_surface.cpp | ||
test_gestures.cpp | ||
test_plugin_effectloader.cpp | ||
test_screen_edges.cpp | ||
test_screen_paint_data.cpp | ||
test_screens.cpp | ||
test_scripted_effectloader.cpp | ||
test_virtual_desktops.cpp | ||
test_window_paint_data.cpp | ||
test_x11_timestamp_update.cpp | ||
test_xcb_size_hints.cpp | ||
test_xcb_window.cpp | ||
test_xcb_wrapper.cpp | ||
test_xkb.cpp | ||
test_xrandr_screens.cpp | ||
testutils.h | ||
workspace.h |