<table><tr><td style="">davidedmundson created this revision.<br />davidedmundson added a reviewer: Plasma.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: KWin, kwin, plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8251" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>In <a href="https://phabricator.kde.org/R108:47343fb8f75909f6491c0534004df56ee1e53737" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">47343fb</a> we made GBM buffer shared.</p>

<p>What we wanted to do was:<br />
Unbox the shared_pointer<GBMSurface> to give us a GBMSurface* object<br />
Call the gbm_surface*() on that operator<br />
Then cast that to a void* for eglCreatePlatformWindowSurfaceEXT</p>

<p>What we did:<br />
Cast the std::shared_ptr<GBMSurface> to a gbm_surface*  then cast that<br />
to void*.<br />
This is just a garbage value and it crashes in Mesa when we do our first<br />
paint.</p>

<p>I've replaced that with an explicit method then we can use shared_ptr's<br />
-> operator rather than get() which does the right thing in a readable<br />
way.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>It crashed after rebasing to master (for Aleix too)<br />
No longer crashes</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8251" rel="noreferrer">https://phabricator.kde.org/D8251</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/test_gbm_surface.cpp<br />
plugins/platforms/drm/egl_gbm_backend.cpp<br />
plugins/platforms/drm/gbm_surface.h</div></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, KWin, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart<br /></div>