ivi-shell: remove ivi_layout_layer_get_dimension API
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Acked-by: wataru_natsume <wataru_natsume@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
c507f67f9e
commit
18691f0310
@@ -554,15 +554,6 @@ struct ivi_layout_interface {
|
|||||||
int32_t (*layer_set_dimension)(struct ivi_layout_layer *ivilayer,
|
int32_t (*layer_set_dimension)(struct ivi_layout_layer *ivilayer,
|
||||||
int32_t dest_width, int32_t dest_height);
|
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.
|
* \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;
|
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
|
static int32_t
|
||||||
ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
|
ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
|
||||||
int32_t dest_width, int32_t dest_height)
|
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_destination_rectangle = ivi_layout_layer_set_destination_rectangle,
|
||||||
.layer_set_position = ivi_layout_layer_set_position,
|
.layer_set_position = ivi_layout_layer_set_position,
|
||||||
.layer_set_dimension = ivi_layout_layer_set_dimension,
|
.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_set_orientation = ivi_layout_layer_set_orientation,
|
||||||
.layer_get_orientation = ivi_layout_layer_get_orientation,
|
.layer_get_orientation = ivi_layout_layer_get_orientation,
|
||||||
.layer_add_surface = ivi_layout_layer_add_surface,
|
.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;
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
||||||
struct ivi_layout_layer *ivilayer;
|
struct ivi_layout_layer *ivilayer;
|
||||||
const struct ivi_layout_layer_properties *prop;
|
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);
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
||||||
iassert(ivilayer != NULL);
|
iassert(ivilayer != NULL);
|
||||||
|
|
||||||
iassert(lyt->layer_get_dimension(
|
prop = lyt->get_properties_of_layer(ivilayer);
|
||||||
ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
|
iassert(prop->dest_width == 200);
|
||||||
iassert(dest_width == 200);
|
iassert(prop->dest_height == 300);
|
||||||
iassert(dest_height == 300);
|
|
||||||
|
|
||||||
iassert(lyt->layer_set_dimension(ivilayer, 400, 600) == IVI_SUCCEEDED);
|
iassert(lyt->layer_set_dimension(ivilayer, 400, 600) == IVI_SUCCEEDED);
|
||||||
|
|
||||||
iassert(lyt->layer_get_dimension(
|
iassert(prop->dest_width == 200);
|
||||||
ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
|
iassert(prop->dest_height == 300);
|
||||||
iassert(dest_width == 200);
|
|
||||||
iassert(dest_height == 300);
|
|
||||||
|
|
||||||
lyt->commit_changes();
|
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_width == 400);
|
||||||
iassert(prop->dest_height == 600);
|
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;
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
||||||
struct ivi_layout_layer *ivilayer;
|
struct ivi_layout_layer *ivilayer;
|
||||||
const struct ivi_layout_layer_properties *prop;
|
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);
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
||||||
iassert(ivilayer != NULL);
|
iassert(ivilayer != NULL);
|
||||||
@@ -325,12 +312,6 @@ test_layer_destination_rectangle(struct test_context *ctx)
|
|||||||
|
|
||||||
lyt->commit_changes();
|
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_width == 400);
|
||||||
iassert(prop->dest_height == 600);
|
iassert(prop->dest_height == 600);
|
||||||
iassert(prop->dest_x == 20);
|
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;
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
||||||
struct ivi_layout_layer *ivilayer;
|
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);
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
||||||
iassert(ivilayer != NULL);
|
iassert(ivilayer != NULL);
|
||||||
@@ -468,13 +447,6 @@ test_layer_bad_dimension(struct test_context *ctx)
|
|||||||
|
|
||||||
lyt->commit_changes();
|
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);
|
lyt->layer_destroy(ivilayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user