xserver-multidpi/present
Michel Dänzer c3e4c1a0fd present/wnmd: Execute copies at target_msc-1 already
It always takes one update cycle for the copy to become visible on the
host windowing system, so waiting for the target MSC resulted in 1 cycle
delay.

We re-use the idle list for copies which were executed but need their
completion event sent.

Fixes black seams when resizing the "Builder" sub-window of

 GDK_BACKEND=x11 gtk4-demo

on Xwayland (see
https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557).

Unfortunately, this cannot completely fix the seams with apps which
queue up multiple frames in advance, since there's always at least one
queued frame corresponding to the old window size. But it should at
least help a little in that case as well.

v2:
* Bug fix: Don't update exec_msc in present_wnmd_check_flip_window.
  (Roman Gilg)
* Use exec_msc = target_msc - 1 instead of exec_msc--, and add a
  comment, for clarity.
v3:
* Drop exec_msc = target_msc again in present_wnmd_execute.
* present_execute_copy should never set vblank->queued in
  present_wnmd_execute now, so replace that branch with an assertion.
  (Roman Gilg)

Reviewed-by: Roman Gilg <subdiff@gmail.com>
Tested-by: Roman Gilg <subdiff@gmail.com>
(cherry picked from commit 1cccb486d4)
[Since present_wnmd_event_notify hasn't been split up on the 1.20
branch, it needs to check vblank->flip. Doing the same in
present_wnmd_free_idle_vblanks to be safe, though I'm not sure it's
actually possible to hit non-flips there.]
2020-10-08 08:36:42 +00:00
..
Makefile.am present: Add window flip mode 2018-03-28 14:36:36 -04:00
meson.build meson: Distribute more SDK headers 2018-04-02 13:42:08 -04:00
present_event.c present: Fix swapping of PresentCompleteNotify events 2018-05-08 12:15:29 -04:00
present_execute.c present: Add present_vblank::exec_msc field 2020-10-08 08:36:42 +00:00
present_fake.c present: Free the fake_present OsTimerPtr 2016-08-15 15:16:48 -04:00
present_fence.c sync: Convert from "CARD64" to int64_t. 2017-09-20 13:19:27 -04:00
present_notify.c present: Add Present extension 2013-10-31 16:59:18 -07:00
present_priv.h present: Add present_vblank::exec_msc field 2020-10-08 08:36:42 +00:00
present_request.c present: cap the version returned to the client 2018-03-19 15:46:41 -04:00
present_scmd.c present: Add present_vblank::exec_msc field 2020-10-08 08:36:42 +00:00
present_screen.c present/wnmd: Free flip_queue entries in present_wnmd_clear_window_flip 2020-07-20 13:22:20 +00:00
present_vblank.c present: Add present_vblank::exec_msc field 2020-10-08 08:36:42 +00:00
present_wnmd.c present/wnmd: Execute copies at target_msc-1 already 2020-10-08 08:36:42 +00:00
present.c present: fix compile warning with debug traces 2019-02-20 14:23:13 -05:00
present.h present: Add exported init function of window flip mode 2018-03-28 14:36:44 -04:00
presentext.h present: Add Present extension 2013-10-31 16:59:18 -07:00