D7888: Make sure OpenGL Context is valid before deleting shader

David Edmundson noreply at phabricator.kde.org
Wed Sep 20 16:02:23 UTC 2017


davidedmundson added inline comments.

INLINE COMMENTS

> graesslin wrote in scene_opengl.cpp:1191-1194
> best would be if we knew that the context is current. But that's unfortunately wishful thinking.
> 
> My suggestion would be to do your option 1:
> 
> > makeOpenGLContextCurrent() but then don't call doneOpenGLContextCurrent?
> 
> In the good old days of pre-Qt5 KWin made the context current exactly once and then never called done. This changed with QtQuick also making a context current. So IIRC we can just make it current but don't have to call done. But I'm not 100 % sure.

There's a few parts of EffectsHandlerImp that calls make() but not done() in response to non-render related things.

Seems to be an established safe pattern.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D7888

To: davidedmundson, #plasma, graesslin
Cc: graesslin, 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/20170920/4549df4a/attachment-0001.html>


More information about the Plasma-devel mailing list