Diffusion KWin 3d619c995b88

Fix DRM EGL crash regression

Authored by davidedmundson on Oct 11 2017, 6:03 PM.

Description

Fix DRM EGL crash regression

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

Details

Committed
davidedmundsonOct 11 2017, 6:04 PM
Differential Revision
D8251: Fix DRM EGL crash regression
Parents
R108:031e1f323f73: Merge branch 'Plasma/5.11'
Branches
Unknown
Tags
Unknown