From 17610f240b416aadd694405e34c36e36ea853042 Mon Sep 17 00:00:00 2001 From: "Ucan, Emre \\(ADITG/SW1\\)" Date: Fri, 4 Mar 2016 12:50:07 +0000 Subject: [PATCH] ivi-shell: remove ivi_layout_layer_get_visibility API Signed-off-by: Emre Ucan Acked-by: wataru_natsume Reviewed-by: Bryce Harrington --- ivi-shell/ivi-layout-export.h | 9 --------- ivi-shell/ivi-layout.c | 12 ------------ tests/ivi_layout-internal-test.c | 11 ++++------- 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index e36d2fc9..fc0e0505 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -528,15 +528,6 @@ struct ivi_layout_interface { int32_t (*layer_set_visibility)(struct ivi_layout_layer *ivilayer, bool newVisibility); - /** - * \brief Get the visibility of a layer. If a layer is not visible, - * the layer and its surfaces will not be rendered. - * - * \return true if layer is visible - * \return false if layer is invisible or the method call was failed - */ - bool (*layer_get_visibility)(struct ivi_layout_layer *ivilayer); - /** * \brief Set the opacity of a ivi_layer. * diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index f1b9e056..2b33796c 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1786,17 +1786,6 @@ ivi_layout_layer_set_visibility(struct ivi_layout_layer *ivilayer, return IVI_SUCCEEDED; } -static bool -ivi_layout_layer_get_visibility(struct ivi_layout_layer *ivilayer) -{ - if (ivilayer == NULL) { - weston_log("ivi_layout_layer_get_visibility: invalid argument\n"); - return false; - } - - return ivilayer->prop.visibility; -} - int32_t ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer, wl_fixed_t opacity) @@ -2767,7 +2756,6 @@ static struct ivi_layout_interface ivi_layout_interface = { .get_layers_under_surface = ivi_layout_get_layers_under_surface, .get_layers_on_screen = ivi_layout_get_layers_on_screen, .layer_set_visibility = ivi_layout_layer_set_visibility, - .layer_get_visibility = ivi_layout_layer_get_visibility, .layer_set_opacity = ivi_layout_layer_set_opacity, .layer_get_opacity = ivi_layout_layer_get_opacity, .layer_set_source_rectangle = ivi_layout_layer_set_source_rectangle, diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c index ec4c8d3a..1ba53b78 100644 --- a/tests/ivi_layout-internal-test.c +++ b/tests/ivi_layout-internal-test.c @@ -177,17 +177,16 @@ test_layer_visibility(struct test_context *ctx) ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300); iassert(ivilayer != NULL); - iassert(lyt->layer_get_visibility(ivilayer) == false); + prop = lyt->get_properties_of_layer(ivilayer); + + iassert(prop->visibility == false); iassert(lyt->layer_set_visibility(ivilayer, true) == IVI_SUCCEEDED); - iassert(lyt->layer_get_visibility(ivilayer) == false); + iassert(prop->visibility == false); lyt->commit_changes(); - iassert(lyt->layer_get_visibility(ivilayer) == true); - - prop = lyt->get_properties_of_layer(ivilayer); iassert(prop->visibility == true); lyt->layer_destroy(ivilayer); @@ -424,8 +423,6 @@ test_layer_bad_visibility(struct test_context *ctx) iassert(lyt->layer_set_visibility(NULL, true) == IVI_FAILED); lyt->commit_changes(); - - iassert(lyt->layer_get_visibility(NULL) == false); } static void