It is only possible to remove a layer from the order.layer_list of a
screen, when ivi_layout_screen_set_render_order is called with an empty
array. Therefore, list of layers are cumulated if the API is called
many times with different list of layers.
Change how the flags are set:
- Introduce the dirty parameter for triggering the render order change.
- IVI_NOTIFICATION_REMOVE/ADD flags are set only at commit_screen_list.
Checking wl_list_empty() on a link offers no information: if it returns
true, wl_list_remove() is safe to do. If it returns false, you still do
not know if wl_list_remove() is safe; the link could be part of a list,
or the link could be "uninitialized" (e.g. just wl_list_remove()'d).
(From Pekka Paalanen's comment at
http://lists.freedesktop.org/archives/wayland-devel/2015-August/023987.html).
Calling wl_list_init just before wl_list_insert is redundant. Because
the links of the list are not read before it is overwritten by
wl_list_insert.
Use assert to control if the ivilayer->order.surface_list is empty.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: line-wrapped commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Ucan, Emre (ADITG/SW1)9 years agocommitted byPekka Paalanen