[PATCH weston 5/5] ivi-shell: simplify ivi_layout_screen_add_layer

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Wed Mar 16 13:37:08 UTC 2016


Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 ivi-shell/ivi-layout.c |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 33e393e..edaece7 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2042,10 +2042,8 @@ ivi_layout_screen_set_render_order(struct ivi_layout_screen *iviscrn,
 				   struct ivi_layout_layer **pLayer,
 				   const int32_t number)
 {
-	struct ivi_layout *layout = get_instance();
 	struct ivi_layout_layer *ivilayer = NULL;
 	struct ivi_layout_layer *next = NULL;
-	uint32_t *id_layer = NULL;
 	int32_t i = 0;
 
 	if (iviscrn == NULL) {
@@ -2062,17 +2060,9 @@ ivi_layout_screen_set_render_order(struct ivi_layout_screen *iviscrn,
 	assert(wl_list_empty(&iviscrn->pending.layer_list));
 
 	for (i = 0; i < number; i++) {
-		id_layer = &pLayer[i]->id_layer;
-		wl_list_for_each(ivilayer, &layout->layer_list, link) {
-			if (*id_layer != ivilayer->id_layer) {
-				continue;
-			}
-
-			wl_list_remove(&ivilayer->pending.link);
-			wl_list_insert(&iviscrn->pending.layer_list,
-				       &ivilayer->pending.link);
-			break;
-		}
+		wl_list_remove(&pLayer[i]->pending.link);
+		wl_list_insert(&iviscrn->pending.layer_list,
+				&pLayer[i]->pending.link);
 	}
 
 	iviscrn->order.dirty = 1;
-- 
1.7.9.5



More information about the wayland-devel mailing list