History

vo_dmabuf_wayland: commit surfaces in correct order

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.

Julian Orth committed 1 year ago

Commit 76da0501 parent b90c1bb1 file · +1 −1Browse files

Unified · Split

video/out/vo_dmabuf_wayland.c+1−1
@@ -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)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t