diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2021-05-25 15:51:52 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2022-12-01 12:41:32 +0100 |
commit | 854c02651f2d3ccba7954ca4601ea1038a8a4dbc (patch) | |
tree | 55157657fbec7fc186e1a43ba59c3fa81443e5e2 | |
parent | d43150573e08bfe94ae7c78a2515808d874553b7 (diff) | |
download | mutter-854c02651f2d3ccba7954ca4601ea1038a8a4dbc.tar.gz |
wayland/surface: Discard presentation feedback in _state_merge_into
Newly merged state is always from a different surface commit than the
existing state.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1880>
-rw-r--r-- | src/wayland/meta-wayland-surface.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 351bc589c..4629ff81e 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -658,6 +658,11 @@ meta_wayland_surface_state_merge_into (MetaWaylandSurfaceState *from, from->subsurface_placement_ops = NULL; } + /* + * A new commit indicates a new content update, so any previous + * content update did not go on screen and needs to be discarded. + */ + meta_wayland_surface_state_discard_presentation_feedback (to); wl_list_insert_list (&to->presentation_feedback_list, &from->presentation_feedback_list); wl_list_init (&from->presentation_feedback_list); @@ -1025,12 +1030,6 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface) { ensure_cached_state (surface); - /* - * A new commit indicates a new content update, so any previous - * cached content update did not go on screen and needs to be discarded. - */ - meta_wayland_surface_state_discard_presentation_feedback (surface->cached_state); - meta_wayland_surface_state_merge_into (pending, surface->cached_state); } else |