D8251: Fix DRM EGL crash regression
David Edmundson
noreply at phabricator.kde.org
Wed Oct 11 18:04:24 UTC 2017
davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: KWin, kwin, plasma-devel.
REVISION SUMMARY
In https://phabricator.kde.org/R108:47343fb8f75909f6491c0534004df56ee1e53737 we made GBM buffer shared.
What we wanted to do was:
Unbox the shared_pointer<GBMSurface> to give us a GBMSurface* object
Call the gbm_surface*() on that operator
Then cast that to a void* for eglCreatePlatformWindowSurfaceEXT
What we did:
Cast the std::shared_ptr<GBMSurface> to a gbm_surface* then cast that
to void*.
This is just a garbage value and it crashes in Mesa when we do our first
paint.
I've replaced that with an explicit method then we can use shared_ptr's
-> operator rather than get() which does the right thing in a readable
way.
TEST PLAN
It crashed after rebasing to master (for Aleix too)
No longer crashes
REPOSITORY
R108 KWin
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D8251
AFFECTED FILES
autotests/test_gbm_surface.cpp
plugins/platforms/drm/egl_gbm_backend.cpp
plugins/platforms/drm/gbm_surface.h
To: davidedmundson, #plasma
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171011/108c0b99/attachment-0001.html>
More information about the Plasma-devel
mailing list