diff options
author | Emre Ucan <eucan@de.adit-jv.com> | 2016-06-30 16:24:14 +0200 |
---|---|---|
committer | Wataru Natsume <wataru_natsume@xddp.denso.co.jp> | 2016-07-06 16:21:39 +0900 |
commit | 52a0ae1d8305fe1f21ee184bd4f343cec2bae250 (patch) | |
tree | a3738c2c85de467491686067155f35d3f4d4483a /weston-ivi-shell | |
parent | 6c2823684105c0bd46aaeca817fe5d87e7c6da25 (diff) | |
download | wayland-ivi-extension-52a0ae1d8305fe1f21ee184bd4f343cec2bae250.tar.gz |
ivi-controller: simplify layer_set_render_order
I used get_surface_from_id API instead of
get_id_of_surface. This simplified the code.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Diffstat (limited to 'weston-ivi-shell')
-rw-r--r-- | weston-ivi-shell/src/ivi-controller.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c index 90f3079..6e85c01 100644 --- a/weston-ivi-shell/src/ivi-controller.c +++ b/weston-ivi-shell/src/ivi-controller.c @@ -734,9 +734,7 @@ controller_layer_set_render_order(struct wl_client *client, struct ivilayer *ivilayer = wl_resource_get_user_data(resource); const struct ivi_layout_interface *lyt = ivilayer->shell->interface; struct ivi_layout_surface **layoutsurf_array = NULL; - struct ivisurface *ivisurf = NULL; uint32_t *id_surface = NULL; - uint32_t id_layout_surface = 0; int i = 0; (void)client; @@ -744,14 +742,10 @@ controller_layer_set_render_order(struct wl_client *client, id_surfaces->size, sizeof(void*)); wl_array_for_each(id_surface, id_surfaces) { - wl_list_for_each(ivisurf, &ivilayer->shell->list_surface, link) { - id_layout_surface = lyt->get_id_of_surface(ivisurf->layout_surface); - if (*id_surface == id_layout_surface) { - layoutsurf_array[i] = ivisurf->layout_surface; - i++; - break; - } - } + layoutsurf_array[i] = lyt->get_surface_from_id(*id_surface); + + if (layoutsurf_array[i]) + i++; } lyt->layer_set_render_order(ivilayer->layout_layer, |