1. 23 Jan, 2021 3 commits
    • Olivier Fourdan's avatar
      compositor: Add throttled repaint · 80498847
      Olivier Fourdan authored
      When using vblank while the screen is turned off, only 1 notification
      per second is triggered.
      
      In such a case, there is no need for the compositor to retry repainting
      the screen at such a high pace as when when the screen is on.
      
      To avoid wasting power resources, simply throttle repaints after 100
      unsuccessful retries.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <fourdan@xfce.org>
      Closes:#502
      80498847
    • Olivier Fourdan's avatar
      compositor: Do not clear timeout on retry · cb06a039
      Olivier Fourdan authored
      When using vblank (either GLX or Xpresent), a previous paint request may
      still be pending while new damage notifications are triggered by clients
      updates.
      
      If that occurs, xfwm4 does not cancel the existing timeout previously
      created timeout (so it will retry automatically) but clears the timeout
      id.
      
      As a result, if new damage occurs, a new timeout would be created while
      an existing one is still running.
      
      When using Xpresent while the screen is turned off, no Xpresent event
      notification occur, which increases the risk of the above occuring.
      
      Clear the timeout id only when the repaint succeeded, so we don't pile
      up multiple retries.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <fourdan@xfce.org>
      See-also: #502
      cb06a039
    • Olivier Fourdan's avatar
      compositor: Fix repaint timeout · 88c735c9
      Olivier Fourdan authored
      Commit 2fa246ca ("Add define for compositor_timeout_cb interval")
      replaced g_timeout_add() with g_timeout_add_full() to separate the
      timeout and priority.
      
      Unfortunately, in doing so, it confused the timeout and priority and
      decreased the priority slightly, causing the repaint timeout to occur
      less often, causing delays in repaint.
      
      Fix the priority and timeout as intended.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <fourdan@xfce.org>
      Fixes: 2fa246ca - Add define for compositor_timeout_cb interval
      Closes: #503
      88c735c9
  2. 20 Jan, 2021 2 commits
  3. 19 Jan, 2021 35 commits