mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-08 13:29:45 -05:00
surface: skip subsurface order commit if unchanged
Also add a small TODO.
This commit is contained in:
parent
0da7eb18ea
commit
d74815682b
1 changed files with 22 additions and 19 deletions
|
|
@ -458,28 +458,31 @@ static void surface_commit_state(struct wlr_surface *surface,
|
||||||
surface_update_opaque_region(surface);
|
surface_update_opaque_region(surface);
|
||||||
surface_update_input_region(surface);
|
surface_update_input_region(surface);
|
||||||
|
|
||||||
// commit subsurface order
|
// TODO: use `next` instead of `surface->pending`
|
||||||
struct wlr_subsurface *subsurface;
|
if (surface->pending.committed & WLR_SURFACE_STATE_SUBSURFACES) {
|
||||||
wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_above,
|
// commit subsurface order
|
||||||
pending.link) {
|
struct wlr_subsurface *subsurface;
|
||||||
wl_list_remove(&subsurface->current.link);
|
wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_above,
|
||||||
wl_list_insert(&surface->current.subsurfaces_above,
|
pending.link) {
|
||||||
&subsurface->current.link);
|
wl_list_remove(&subsurface->current.link);
|
||||||
|
wl_list_insert(&surface->current.subsurfaces_above,
|
||||||
|
&subsurface->current.link);
|
||||||
|
|
||||||
if (subsurface->reordered) {
|
if (subsurface->reordered) {
|
||||||
// TODO: damage all the subsurfaces
|
// TODO: damage all the subsurfaces
|
||||||
surface_damage_subsurfaces(subsurface);
|
surface_damage_subsurfaces(subsurface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_below,
|
||||||
wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_below,
|
pending.link) {
|
||||||
pending.link) {
|
wl_list_remove(&subsurface->current.link);
|
||||||
wl_list_remove(&subsurface->current.link);
|
wl_list_insert(&surface->current.subsurfaces_below,
|
||||||
wl_list_insert(&surface->current.subsurfaces_below,
|
&subsurface->current.link);
|
||||||
&subsurface->current.link);
|
|
||||||
|
|
||||||
if (subsurface->reordered) {
|
if (subsurface->reordered) {
|
||||||
// TODO: damage all the subsurfaces
|
// TODO: damage all the subsurfaces
|
||||||
surface_damage_subsurfaces(subsurface);
|
surface_damage_subsurfaces(subsurface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue