[PATCH weston v2 14/14] ivi-shell: remove ivi_layout_layer_set_dimension API

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Fri Mar 4 12:50:52 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           |   26 --------------------------
 tests/ivi_layout-internal-test.c |   35 ++---------------------------------
 3 files changed, 2 insertions(+), 68 deletions(-)

diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index f079931..85bf91a 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -509,15 +509,6 @@ struct ivi_layout_interface {
 						   int32_t width, int32_t height);
 
 	/**
-	 * \brief Set the horizontal and vertical dimension of the layer.
-	 *
-	 * \return IVI_SUCCEEDED if the method call was successful
-	 * \return IVI_FAILED if the method call was failed
-	 */
-	int32_t (*layer_set_dimension)(struct ivi_layout_layer *ivilayer,
-				       int32_t dest_width, int32_t dest_height);
-
-	/**
 	 * \brief Sets the orientation 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 c3998e3..b6a2bb1 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1867,31 +1867,6 @@ ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
 }
 
 static int32_t
-ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
-			       int32_t dest_width, int32_t dest_height)
-{
-	struct ivi_layout_layer_properties *prop = NULL;
-
-	if (ivilayer == NULL) {
-		weston_log("ivi_layout_layer_set_dimension: invalid argument\n");
-		return IVI_FAILED;
-	}
-
-	prop = &ivilayer->pending.prop;
-
-	prop->dest_width  = dest_width;
-	prop->dest_height = dest_height;
-
-	if (ivilayer->prop.dest_width != dest_width ||
-	    ivilayer->prop.dest_height != dest_height)
-		ivilayer->event_mask |= IVI_NOTIFICATION_DIMENSION;
-	else
-		ivilayer->event_mask &= ~IVI_NOTIFICATION_DIMENSION;
-
-	return IVI_SUCCEEDED;
-}
-
-static int32_t
 ivi_layout_layer_set_orientation(struct ivi_layout_layer *ivilayer,
 				 enum wl_output_transform orientation)
 {
@@ -2581,7 +2556,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
 	.layer_set_opacity			= ivi_layout_layer_set_opacity,
 	.layer_set_source_rectangle		= ivi_layout_layer_set_source_rectangle,
 	.layer_set_destination_rectangle	= ivi_layout_layer_set_destination_rectangle,
-	.layer_set_dimension			= ivi_layout_layer_set_dimension,
 	.layer_set_orientation			= ivi_layout_layer_set_orientation,
 	.layer_add_surface			= ivi_layout_layer_add_surface,
 	.layer_remove_surface			= ivi_layout_layer_remove_surface,
diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c
index 1e22c75..06abcaa 100644
--- a/tests/ivi_layout-internal-test.c
+++ b/tests/ivi_layout-internal-test.c
@@ -220,7 +220,8 @@ test_layer_dimension(struct test_context *ctx)
 	iassert(prop->dest_width == 200);
 	iassert(prop->dest_height == 300);
 
-	iassert(lyt->layer_set_dimension(ivilayer, 400, 600) == IVI_SUCCEEDED);
+	iassert(lyt->layer_set_destination_rectangle(ivilayer, prop->dest_x, prop->dest_y,
+			400, 600) == IVI_SUCCEEDED);
 
 	iassert(prop->dest_width == 200);
 	iassert(prop->dest_height == 300);
@@ -410,22 +411,6 @@ test_layer_bad_orientation(struct test_context *ctx)
 }
 
 static void
-test_layer_bad_dimension(struct test_context *ctx)
-{
-	const struct ivi_layout_interface *lyt = ctx->layout_interface;
-	struct ivi_layout_layer *ivilayer;
-
-	ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
-	iassert(ivilayer != NULL);
-
-	iassert(lyt->layer_set_dimension(NULL, 200, 300) == IVI_FAILED);
-
-	lyt->commit_changes();
-
-	lyt->layer_destroy(ivilayer);
-}
-
-static void
 test_layer_bad_source_rectangle(struct test_context *ctx)
 {
 	const struct ivi_layout_interface *lyt = ctx->layout_interface;
@@ -487,20 +472,6 @@ test_commit_changes_after_orientation_set_layer_destroy(struct test_context *ctx
 }
 
 static void
-test_commit_changes_after_dimension_set_layer_destroy(struct test_context *ctx)
-{
-	const struct ivi_layout_interface *lyt = ctx->layout_interface;
-	struct ivi_layout_layer *ivilayer;
-
-	ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
-	iassert(ivilayer != NULL);
-
-	iassert(lyt->layer_set_dimension(ivilayer, 200, 300) == IVI_SUCCEEDED);
-	lyt->layer_destroy(ivilayer);
-	lyt->commit_changes();
-}
-
-static void
 test_commit_changes_after_source_rectangle_set_layer_destroy(struct test_context *ctx)
 {
 	const struct ivi_layout_interface *lyt = ctx->layout_interface;
@@ -1007,13 +978,11 @@ run_internal_tests(void *data)
 	test_layer_bad_opacity(ctx);
 	test_layer_bad_destination_rectangle(ctx);
 	test_layer_bad_orientation(ctx);
-	test_layer_bad_dimension(ctx);
 	test_layer_bad_source_rectangle(ctx);
 	test_layer_bad_properties(ctx);
 	test_commit_changes_after_visibility_set_layer_destroy(ctx);
 	test_commit_changes_after_opacity_set_layer_destroy(ctx);
 	test_commit_changes_after_orientation_set_layer_destroy(ctx);
-	test_commit_changes_after_dimension_set_layer_destroy(ctx);
 	test_commit_changes_after_source_rectangle_set_layer_destroy(ctx);
 	test_commit_changes_after_destination_rectangle_set_layer_destroy(ctx);
 	test_layer_create_duplicate(ctx);
-- 
1.7.9.5



More information about the wayland-devel mailing list