Commit f46306f0 authored by eucan's avatar eucan Committed by Pekka Paalanen

ivi-shell: simplify ivi_layout_screen_add_layer

It is not necessary check the ivi-id of pregiven objects (layer or
surface). Traversing the list of all objects is sure to find the exact
same pointer we start with, bugs aside.

The controller modules are responsible for providing valid pointers. We
cannot protect from invalid pointers anyway.
Signed-off-by: eucan's avatarEmre Ucan <>
[Pekka: commit message]
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <>
parent 72ad164b
......@@ -2014,10 +2014,6 @@ static int32_t
ivi_layout_screen_add_layer(struct ivi_layout_screen *iviscrn,
struct ivi_layout_layer *addlayer)
struct ivi_layout *layout = get_instance();
struct ivi_layout_layer *ivilayer = NULL;
struct ivi_layout_layer *next = NULL;
if (iviscrn == NULL || addlayer == NULL) {
weston_log("ivi_layout_screen_add_layer: invalid argument\n");
return IVI_FAILED;
......@@ -2028,14 +2024,8 @@ ivi_layout_screen_add_layer(struct ivi_layout_screen *iviscrn,
wl_list_for_each_safe(ivilayer, next, &layout->layer_list, link) {
if (ivilayer->id_layer == addlayer->id_layer) {
wl_list_insert(&iviscrn->pending.layer_list, &addlayer->;
iviscrn->order.dirty = 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment