• Vlad Zahorodnii's avatar
    plugins/qpa: Assume there's current context when swapBuffers() is called · a9267bdc
    Vlad Zahorodnii authored
    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.
    a9267bdc