Skip to content
Snippets Groups Projects

qt: x11: do not call `::{create,destroy}Fbo()` before making the context current and relax assertions

Merged Fatih Uzunoğlu requested to merge fuzun/vlc:qt/x11relaxassertions into master
  1. Mar 25, 2025
    • Fatih Uzunoğlu's avatar
      qt: make context current before calling `::createFbo()` and `::destroyFbo()`... · 99162581
      Fatih Uzunoğlu authored and Felix Paul Kühne's avatar Felix Paul Kühne committed
      qt: make context current before calling `::createFbo()` and `::destroyFbo()` in `CompositorX11UISurface`
      
      The reason these methods don't make the context current themselves is because
      they are called together in `resizeFbo()` where the context is already made
      current. This makes it possible to make current once instead of twice (with
      accompanying done current in these methods).
      99162581
    • Fatih Uzunoğlu's avatar
      qt: relax made current assertions in `CompositorX11UISurface` · 3257b2e4
      Fatih Uzunoğlu authored and Felix Paul Kühne's avatar Felix Paul Kühne committed
      Rather than having an assertion regarding the context became current,
      we can simply early return in these functions. If the context could
      not be made current, it is likely that we are in some sort of
      transitional phase and `resizeFbo()` would be called later when the
      state is stable either directly or indirectly.
      
      `render()`, on the other is periodically called anyway. It should
      be fine to simply return early instead of triggering assertion
      failure. When the context can be made current, it can do its job.
      3257b2e4
Loading