Skip to content
Commit 5bca0588 authored by David Edmundson's avatar David Edmundson
Browse files

Fix DRM EGL crash regression

Summary:
In 47343fb8 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

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8251
parent d6a906da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment