ivi-shell: remove is_layer_in_screen API
This internal API is redundant, because a layer is allowed to be only on one screen. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
This commit is contained in:
committed by
Pekka Paalanen
parent
dfac375993
commit
bb4ec0a186
+1
-18
@@ -251,21 +251,6 @@ is_surface_in_layer(struct ivi_layout_surface *ivisurf,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
is_layer_in_screen(struct ivi_layout_layer *ivilayer,
|
|
||||||
struct ivi_layout_screen *iviscrn)
|
|
||||||
{
|
|
||||||
struct ivi_layout_layer *layer = NULL;
|
|
||||||
|
|
||||||
wl_list_for_each(layer, &iviscrn->pending.layer_list, pending.link) {
|
|
||||||
if (layer->id_layer == ivilayer->id_layer) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal API to initialize ivi_screens found from output_list of weston_compositor.
|
* Internal API to initialize ivi_screens found from output_list of weston_compositor.
|
||||||
* Called by ivi_layout_init_with_compositor.
|
* Called by ivi_layout_init_with_compositor.
|
||||||
@@ -2245,15 +2230,13 @@ ivi_layout_screen_add_layer(struct ivi_layout_screen *iviscrn,
|
|||||||
struct ivi_layout *layout = get_instance();
|
struct ivi_layout *layout = get_instance();
|
||||||
struct ivi_layout_layer *ivilayer = NULL;
|
struct ivi_layout_layer *ivilayer = NULL;
|
||||||
struct ivi_layout_layer *next = NULL;
|
struct ivi_layout_layer *next = NULL;
|
||||||
int is_layer_in_scrn = 0;
|
|
||||||
|
|
||||||
if (iviscrn == NULL || addlayer == NULL) {
|
if (iviscrn == NULL || addlayer == NULL) {
|
||||||
weston_log("ivi_layout_screen_add_layer: invalid argument\n");
|
weston_log("ivi_layout_screen_add_layer: invalid argument\n");
|
||||||
return IVI_FAILED;
|
return IVI_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
is_layer_in_scrn = is_layer_in_screen(addlayer, iviscrn);
|
if (addlayer->on_screen == iviscrn) {
|
||||||
if (is_layer_in_scrn == 1) {
|
|
||||||
weston_log("ivi_layout_screen_add_layer: addlayer is already available\n");
|
weston_log("ivi_layout_screen_add_layer: addlayer is already available\n");
|
||||||
return IVI_SUCCEEDED;
|
return IVI_SUCCEEDED;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user