Commit a9267bdc authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

plugins/qpa: Assume there's current context when swapBuffers() is called

It can happen that the window is resized after makeCurrent() and before
swapBuffers(). In that case, context()->makeCurrent() will re-create the
fbo and qpa will present an uninitialize fbo.

Assume that there's current context when swapBuffers() is called. Other
QPA already do this, for example, QtWayland. This would make the
behavior of our qpa consistent with QtWayland and fix resizing the fbo
in swapBuffers().

In general, kwin should be able to handle size mismatch between the fbo
and QWindow, but as an extra hardening measure, we could forbid resizing
windows during rendering, this can be done later though.
parent 11ad5fea
Pipeline #218544 passed with stage
in 16 minutes and 6 seconds
......@@ -118,7 +118,6 @@ void EGLPlatformContext::swapBuffers(QPlatformSurface *surface)
if (!internalWindow) {
return;
}
context()->makeCurrent(surface->surface());
glFlush();
auto fbo = window->swapFBO();
window->bindContentFBO();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment