osd_surface is a sync sub-surface of video_surface meaning that a commit of osd_surface will not take effect until the next commit of video_surface. Some compositors (wlroots) do not implement sync sub-surface correctly, meaning that the difference cannot be observed there. But it can easily be seen on Jay and GNOME: 1. Open an mpv window. 2. Pause the video. 3. Enter the surface with the mouse. Expected behavior: 1. The OSD shows up immediately. Actual behavior: 1. Nothing happens for a few seconds. 2. The OSD shows up and immediately fades out. This is because the fade-out commits cause the initial osd_surface commit to become effective.
Unified · Split
| @@ -649,8 +649,8 @@ static void flip_page(struct vo *vo) · 648 unmodified lines | |||
| 649 | { | 649 | { |
| 650 | struct vo_wayland_state *wl = vo->wl; | 650 | struct vo_wayland_state *wl = vo->wl; |
| 651 | 651 | ||
| 652 | wl_surface_commit(wl->video_surface); | ||
| 653 | wl_surface_commit(wl->osd_surface); | 652 | wl_surface_commit(wl->osd_surface); |
| 653 | wl_surface_commit(wl->video_surface); | ||
| 654 | wl_surface_commit(wl->surface); | 654 | wl_surface_commit(wl->surface); |
| 655 | 655 | ||
| 656 | if (wl->opts->wl_internal_vsync) | 656 | if (wl->opts->wl_internal_vsync) |