diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index b5c66279..4b2697cb 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -554,15 +554,6 @@ struct ivi_layout_interface { int32_t (*layer_set_dimension)(struct ivi_layout_layer *ivilayer, 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. * diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 27cc270c..64e7a2f8 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1866,21 +1866,6 @@ ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer, return IVI_SUCCEEDED; } -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) @@ -2691,7 +2676,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 78ac7de4..4436c2c1 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); @@ -458,8 +439,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); @@ -468,13 +447,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); }