[PATCH weston 02/14] ivi-shell: remove ivi_layout_layer_get_visibility API

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Fri Feb 26 15:58:03 UTC 2016


Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 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 e36d2fc..fc0e050 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -529,15 +529,6 @@ struct ivi_layout_interface {
 					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.
 	 *
 	 * \return IVI_SUCCEEDED if the method call was successful
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index f15ee32..4fb3518 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)
@@ -2769,7 +2758,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 ec4c8d3..1ba53b7 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
-- 
1.7.9.5



More information about the wayland-devel mailing list