[PATCH weston 08/14] ivi-shell: remove ivi_layout_layer_get_dimension API
Ucan, Emre (ADITG/SW1)
eucan at de.adit-jv.com
Fri Feb 26 15:58:23 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 | 16 ----------------
tests/ivi_layout-internal-test.c | 38 +++++---------------------------------
3 files changed, 5 insertions(+), 58 deletions(-)
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index b5c6627..4b2697c 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -555,15 +555,6 @@ struct ivi_layout_interface {
int32_t dest_width, int32_t dest_height);
/**
- * \brief Get 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_get_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 5552f5d..d2598b3 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1867,21 +1867,6 @@ ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
}
static int32_t
-ivi_layout_layer_get_dimension(struct ivi_layout_layer *ivilayer,
- int32_t *dest_width, int32_t *dest_height)
-{
- if (ivilayer == NULL || dest_width == NULL || dest_height == NULL) {
- weston_log("ivi_layout_layer_get_dimension: invalid argument\n");
- return IVI_FAILED;
- }
-
- *dest_width = ivilayer->prop.dest_width;
- *dest_height = ivilayer->prop.dest_height;
-
- return IVI_SUCCEEDED;
-}
-
-static int32_t
ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
int32_t dest_width, int32_t dest_height)
{
@@ -2693,7 +2678,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.layer_set_destination_rectangle = ivi_layout_layer_set_destination_rectangle,
.layer_set_position = ivi_layout_layer_set_position,
.layer_set_dimension = ivi_layout_layer_set_dimension,
- .layer_get_dimension = ivi_layout_layer_get_dimension,
.layer_set_orientation = ivi_layout_layer_set_orientation,
.layer_get_orientation = ivi_layout_layer_get_orientation,
.layer_add_surface = ivi_layout_layer_add_surface,
diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c
index 3847c80..8b57fa0 100644
--- a/tests/ivi_layout-internal-test.c
+++ b/tests/ivi_layout-internal-test.c
@@ -236,32 +236,21 @@ test_layer_dimension(struct test_context *ctx)
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_layer *ivilayer;
const struct ivi_layout_layer_properties *prop;
- int32_t dest_width;
- int32_t dest_height;
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
iassert(ivilayer != NULL);
- iassert(lyt->layer_get_dimension(
- ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
- iassert(dest_width == 200);
- iassert(dest_height == 300);
+ prop = lyt->get_properties_of_layer(ivilayer);
+ iassert(prop->dest_width == 200);
+ iassert(prop->dest_height == 300);
iassert(lyt->layer_set_dimension(ivilayer, 400, 600) == IVI_SUCCEEDED);
- iassert(lyt->layer_get_dimension(
- ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
- iassert(dest_width == 200);
- iassert(dest_height == 300);
+ iassert(prop->dest_width == 200);
+ iassert(prop->dest_height == 300);
lyt->commit_changes();
- iassert(IVI_SUCCEEDED == lyt->layer_get_dimension(
- ivilayer, &dest_width, &dest_height));
- iassert(dest_width == 400);
- iassert(dest_height == 600);
-
- prop = lyt->get_properties_of_layer(ivilayer);
iassert(prop->dest_width == 400);
iassert(prop->dest_height == 600);
@@ -302,8 +291,6 @@ test_layer_destination_rectangle(struct test_context *ctx)
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_layer *ivilayer;
const struct ivi_layout_layer_properties *prop;
- int32_t dest_width;
- int32_t dest_height;
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
iassert(ivilayer != NULL);
@@ -325,12 +312,6 @@ test_layer_destination_rectangle(struct test_context *ctx)
lyt->commit_changes();
- iassert(lyt->layer_get_dimension(
- ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
- iassert(dest_width == 400);
- iassert(dest_height == 600);
-
- prop = lyt->get_properties_of_layer(ivilayer);
iassert(prop->dest_width == 400);
iassert(prop->dest_height == 600);
iassert(prop->dest_x == 20);
@@ -460,8 +441,6 @@ test_layer_bad_dimension(struct test_context *ctx)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_layer *ivilayer;
- int32_t dest_width;
- int32_t dest_height;
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
iassert(ivilayer != NULL);
@@ -470,13 +449,6 @@ test_layer_bad_dimension(struct test_context *ctx)
lyt->commit_changes();
- iassert(lyt->layer_get_dimension(
- NULL, &dest_width, &dest_height) == IVI_FAILED);
- iassert(lyt->layer_get_dimension(
- ivilayer, NULL, &dest_height) == IVI_FAILED);
- iassert(lyt->layer_get_dimension(
- ivilayer, &dest_width, NULL) == IVI_FAILED);
-
lyt->layer_destroy(ivilayer);
}
--
1.7.9.5
More information about the wayland-devel
mailing list