mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
surface: don't cache frame callback lists
This commit is contained in:
parent
456c6e2279
commit
f12bacf4b4
@ -327,11 +327,6 @@ static void surface_state_move(struct wlr_surface_state *state,
|
||||
if (next->committed & WLR_SURFACE_STATE_BUFFER_DAMAGE) {
|
||||
pixman_region32_clear(&next->buffer_damage);
|
||||
}
|
||||
if (next->committed & WLR_SURFACE_STATE_FRAME_CALLBACK_LIST) {
|
||||
wl_list_insert_list(&state->frame_callback_list,
|
||||
&next->frame_callback_list);
|
||||
wl_list_init(&next->frame_callback_list);
|
||||
}
|
||||
|
||||
next->committed = 0;
|
||||
next->cached_state_locks = 0;
|
||||
@ -501,6 +496,14 @@ static void surface_commit_pending(struct wlr_surface *surface) {
|
||||
surface->role->precommit(surface);
|
||||
}
|
||||
|
||||
// It doesn't to make sense to cache callback lists, so we always move
|
||||
// them to the current state.
|
||||
if (surface->pending.committed & WLR_SURFACE_STATE_FRAME_CALLBACK_LIST) {
|
||||
wl_list_insert_list(&surface->current.frame_callback_list,
|
||||
&surface->pending.frame_callback_list);
|
||||
wl_list_init(&surface->pending.frame_callback_list);
|
||||
}
|
||||
|
||||
if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
|
||||
surface_cache_pending(surface);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user