diff options
author | Ucan, Emre (ADITG/SW1) <eucan@de.adit-jv.com> | 2016-03-17 15:30:39 +0000 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-03-24 11:10:07 +0200 |
commit | 3a8521e0056d44602106ac7bbe38dab2c4a8a3ed (patch) | |
tree | 01f9b707627fe8b322b1660fcc8c274bb44aac31 /tests/ivi_layout-internal-test.c | |
parent | ff6a9f8474dbfdef79c87084f435d9b02c7a33b1 (diff) |
ivi-shell: remove ivi_layout_get_screens API
The compositor data struct already has a list of weston outputs.
Therefore, this API is not required.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
Diffstat (limited to 'tests/ivi_layout-internal-test.c')
-rw-r--r-- | tests/ivi_layout-internal-test.c | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c index 6b7ca20d..2dfe486a 100644 --- a/tests/ivi_layout-internal-test.c +++ b/tests/ivi_layout-internal-test.c @@ -544,46 +544,20 @@ test_get_layer_after_destory_layer(struct test_context *ctx) } static void -test_screen_id(struct test_context *ctx) -{ - const struct ivi_layout_interface *lyt = ctx->layout_interface; - struct ivi_layout_screen **iviscrns; - struct weston_output *output; - int32_t screen_length = 0; - int32_t i; - - iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED); - iassert(screen_length > 0); - - for (i = 0; i < screen_length; ++i) { - output = lyt->screen_get_output(iviscrns[i]); - iassert(lyt->get_screen_from_id(output->id) == iviscrns[i]); - } - - if (screen_length > 0) - free(iviscrns); -} - -static void test_screen_render_order(struct test_context *ctx) { #define LAYER_NUM (3) const struct ivi_layout_interface *lyt = ctx->layout_interface; - struct ivi_layout_screen **iviscrns; - int32_t screen_length = 0; struct ivi_layout_screen *iviscrn; struct ivi_layout_layer *ivilayers[LAYER_NUM] = {}; struct ivi_layout_layer **array; int32_t length = 0; uint32_t i; - iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED); - iassert(screen_length > 0); - - if (screen_length <= 0) + if (wl_list_empty(&ctx->compositor->output_list)) return; - iviscrn = iviscrns[0]; + iviscrn = lyt->get_screen_from_id(0); for (i = 0; i < LAYER_NUM; i++) ivilayers[i] = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(i), 200, 300); @@ -612,7 +586,6 @@ test_screen_render_order(struct test_context *ctx) for (i = 0; i < LAYER_NUM; i++) lyt->layer_destroy(ivilayers[i]); - free(iviscrns); #undef LAYER_NUM } @@ -621,21 +594,16 @@ test_screen_bad_render_order(struct test_context *ctx) { #define LAYER_NUM (3) const struct ivi_layout_interface *lyt = ctx->layout_interface; - struct ivi_layout_screen **iviscrns; - int32_t screen_length; struct ivi_layout_screen *iviscrn; struct ivi_layout_layer *ivilayers[LAYER_NUM] = {}; struct ivi_layout_layer **array; int32_t length = 0; uint32_t i; - iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED); - iassert(screen_length > 0); - - if (screen_length <= 0) + if (wl_list_empty(&ctx->compositor->output_list)) return; - iviscrn = iviscrns[0]; + iviscrn = lyt->get_screen_from_id(0); for (i = 0; i < LAYER_NUM; i++) ivilayers[i] = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(i), 200, 300); @@ -651,7 +619,6 @@ test_screen_bad_render_order(struct test_context *ctx) for (i = 0; i < LAYER_NUM; i++) lyt->layer_destroy(ivilayers[i]); - free(iviscrns); #undef LAYER_NUM } @@ -661,19 +628,14 @@ test_commit_changes_after_render_order_set_layer_destroy( { #define LAYER_NUM (3) const struct ivi_layout_interface *lyt = ctx->layout_interface; - struct ivi_layout_screen **iviscrns; - int32_t screen_length; struct ivi_layout_screen *iviscrn; struct ivi_layout_layer *ivilayers[LAYER_NUM] = {}; uint32_t i; - iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED); - iassert(screen_length > 0); - - if (screen_length <= 0) + if (wl_list_empty(&ctx->compositor->output_list)) return; - iviscrn = iviscrns[0]; + iviscrn = lyt->get_screen_from_id(0); for (i = 0; i < LAYER_NUM; i++) ivilayers[i] = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(i), 200, 300); @@ -686,8 +648,6 @@ test_commit_changes_after_render_order_set_layer_destroy( lyt->layer_destroy(ivilayers[0]); lyt->layer_destroy(ivilayers[2]); - - free(iviscrns); #undef LAYER_NUM } @@ -938,7 +898,6 @@ run_internal_tests(void *data) test_layer_create_duplicate(ctx); test_get_layer_after_destory_layer(ctx); - test_screen_id(ctx); test_screen_render_order(ctx); test_screen_bad_render_order(ctx); test_commit_changes_after_render_order_set_layer_destroy(ctx); |