[plugins/qpa] Add explanatory comment

This commit is contained in:
David Edmundson 2018-10-05 14:38:20 +01:00
parent 6ebfa59331
commit 0b7778f964

View file

@ -50,6 +50,8 @@ bool SharingPlatformContext::makeCurrent(QPlatformSurface *surface)
{ {
Window *window = static_cast<Window*>(surface); Window *window = static_cast<Window*>(surface);
// QOpenGLContext::makeCurrent in Qt5.12 calls platfrom->setContext before setCurrentContext
// but binding the content FBO looks up the format from the current context, so we need // to make sure sure Qt knows what the correct one is already
QOpenGLContextPrivate::setCurrentContext(context()); QOpenGLContextPrivate::setCurrentContext(context());
if (eglMakeCurrent(eglDisplay(), m_surface, m_surface, eglContext())) { if (eglMakeCurrent(eglDisplay(), m_surface, m_surface, eglContext())) {
window->bindContentFBO(); window->bindContentFBO();