summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUcan, Emre (ADITG/SW1) <eucan@de.adit-jv.com>2016-03-16 13:37:05 +0000
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-17 13:31:39 +0200
commit72ad164b5dba6fb295c7eff7440805aad01bd120 (patch)
tree4d417735c6cdf3912aa7bebd9274c267cbef556f
parent10942379d295af1f02513daebd5e81a82641dd3f (diff)
ivi-shell: simplify ivi_layout_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: commit message] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--ivi-shell/ivi-layout.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index f2ba15de..5f25e100 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1890,10 +1890,6 @@ ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
struct ivi_layout_surface **pSurface,
int32_t number)
{
- struct ivi_layout *layout = get_instance();
- struct ivi_layout_surface *ivisurf = NULL;
- struct ivi_layout_surface *next = NULL;
- uint32_t *id_surface = NULL;
int32_t i = 0;
if (ivilayer == NULL) {
@@ -1904,18 +1900,9 @@ ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
clear_surface_pending_list(ivilayer);
for (i = 0; i < number; i++) {
- id_surface = &pSurface[i]->id_surface;
-
- wl_list_for_each_safe(ivisurf, next, &layout->surface_list, link) {
- if (*id_surface != ivisurf->id_surface) {
- continue;
- }
-
- wl_list_remove(&ivisurf->pending.link);
- wl_list_insert(&ivilayer->pending.surface_list,
- &ivisurf->pending.link);
- break;
- }
+ wl_list_remove(&pSurface[i]->pending.link);
+ wl_list_insert(&ivilayer->pending.surface_list,
+ &pSurface[i]->pending.link);
}
ivilayer->order.dirty = 1;