[Differential] [Request, 8 lines] D2582: [plugins/qpa] Call makeCurrent on the QOpenGLContext instead of the one in the platform context

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Fri Aug 26 05:38:07 UTC 2016


graesslin created this revision.
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added subscribers: kwin, plasma-devel.
Restricted Application added projects: Plasma on Wayland, KWin.

REVISION SUMMARY
  SharingPlatformContext::swapBuffers needs to make the context current.
  For this is calls makeCurrent. Later on this tries to bind a fbo, which
  checks calls into the current QOpenGLContext. As we called makeCurrent on
  our own platform context Qt doesn't know that the context is current and
  returns in the worst case a nullptr and crashes.
  
  This change calls makeCurrent on the QOpenGLContext so that Qt also knows
  that this context is current now. The QOpenGLContext calls makeCurrent on
  the platform context, so what our code tried to do is still being done.
  
  In addition the method context() in AbstractPlatformContext is renamed to
  eglContext to no longer shadow the method in QPlatformContext.

REPOSITORY
  rKWIN KWin

BRANCH
  qpa-opengl-context-make-current

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

AFFECTED FILES
  plugins/qpa/abstractplatformcontext.h
  plugins/qpa/platformcontextwayland.cpp
  plugins/qpa/sharingplatformcontext.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma_on_wayland
Cc: plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160826/90a536ba/attachment.html>


More information about the Plasma-devel mailing list