Fix DRM EGL crash regression
ClosedPublic

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

Details

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

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Oct 11 2017, 6:04 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 11 2017, 6:04 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
graesslin accepted this revision.Oct 11 2017, 7:12 PM
graesslin added a subscriber: graesslin.

whoops. Thanks for fixing.

This revision is now accepted and ready to land.Oct 11 2017, 7:12 PM
This revision was automatically updated to reflect the committed changes.