summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUcan, Emre (ADITG/SW1) <eucan@de.adit-jv.com>2016-03-16 13:37:08 +0000
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-17 13:32:21 +0200
commit4e221f0327cbc342d78916a62ace64368471d55b (patch)
tree7f992e2c02a57a88d70b23d7ed8156ebd9f15912
parentf46306f0593eb51afbe1ba1edf3939eea58dcfbb (diff)
ivi-shell: simplify ivi_layout_screen_set_render_order
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: Emre Ucan <eucan@de.adit-jv.com> [Pekka: fix subject, add commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--ivi-shell/ivi-layout.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index de510a85..437ba22f 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2037,10 +2037,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) {
@@ -2057,17 +2055,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;