Skip to content
  • Michel Dänzer's avatar
    xwayland: Complete "synchronous" Present flips from xwl_present_msc_bump · ace551d8
    Michel Dänzer authored and Adam Jackson's avatar Adam Jackson committed
    Completing them from xwl_present_sync_callback had at least two issues:
    
    * It was before the MSC was incremented in xwl_present_frame_callback,
      so the MSC value in the completion event could be lower than the
      target specified by the client. This could cause hangs with the Mesa
      Vulkan drivers.
    * It allowed clients to run at a frame-rate higher than the Wayland
      compositor's frame-rate, wasting energy on generating frames which
      were never displayed. This isn't expected to happen unless the client
      specified PresentOptionAsync (in which case flips are still completed
      from xwl_present_sync_callback, allowing higher frame-rates).
    
    v2:
    * Make xwl_present_has_events return true when there's a pending
      "synchronous" flip, so those complete after at most ~1 second even if
      the Wayland server doesn't send a frame event.
    
    Bugzilla: https://bugs.freedesktop.org/106713
    ace551d8