Commit 18691f03 authored by eucan's avatar eucan Committed by Bryce Harrington

ivi-shell: remove ivi_layout_layer_get_dimension API

Signed-off-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
Acked-by: default avatarwataru_natsume <wataru_natsume@xddp.denso.co.jp>
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
parent c507f67f
......@@ -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.
*
......
......@@ -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,
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment