ivi-shell: remove ivi_layout_surface_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:
Ucan, Emre \(ADITG/SW1\) 2016-03-04 12:50:28 +00:00 committed by Bryce Harrington
parent dfc2d76432
commit c507f67f9e
6 changed files with 8 additions and 62 deletions

View File

@ -329,15 +329,6 @@ struct ivi_layout_interface {
int32_t (*surface_set_dimension)(struct ivi_layout_surface *ivisurf,
int32_t dest_width, int32_t dest_height);
/**
* \brief Get the horizontal and vertical dimension of the surface.
*
* \return IVI_SUCCEEDED if the method call was successful
* \return IVI_FAILED if the method call was failed
*/
int32_t (*surface_get_dimension)(struct ivi_layout_surface *ivisurf,
int32_t *dest_width, int32_t *dest_height);
/**
* \brief Sets the orientation of a ivi_surface.
*

View File

@ -171,9 +171,6 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
uint32_t id_surface);
void
ivi_layout_init_with_compositor(struct weston_compositor *ec);
int32_t
ivi_layout_surface_get_dimension(struct ivi_layout_surface *ivisurf,
int32_t *dest_width, int32_t *dest_height);
void
ivi_layout_surface_add_configured_listener(struct ivi_layout_surface* ivisurf,
struct wl_listener* listener);

View File

@ -2102,21 +2102,6 @@ ivi_layout_surface_set_dimension(struct ivi_layout_surface *ivisurf,
return IVI_SUCCEEDED;
}
int32_t
ivi_layout_surface_get_dimension(struct ivi_layout_surface *ivisurf,
int32_t *dest_width, int32_t *dest_height)
{
if (ivisurf == NULL || dest_width == NULL || dest_height == NULL) {
weston_log("ivi_layout_surface_get_dimension: invalid argument\n");
return IVI_FAILED;
}
*dest_width = ivisurf->prop.dest_width;
*dest_height = ivisurf->prop.dest_height;
return IVI_SUCCEEDED;
}
static int32_t
ivi_layout_surface_set_position(struct ivi_layout_surface *ivisurf,
int32_t dest_x, int32_t dest_y)
@ -2676,7 +2661,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.surface_set_destination_rectangle = ivi_layout_surface_set_destination_rectangle,
.surface_set_position = ivi_layout_surface_set_position,
.surface_set_dimension = ivi_layout_surface_set_dimension,
.surface_get_dimension = ivi_layout_surface_get_dimension,
.surface_set_orientation = ivi_layout_surface_set_orientation,
.surface_get_orientation = ivi_layout_surface_get_orientation,
.surface_set_content_observer = ivi_layout_surface_set_content_observer,

View File

@ -88,11 +88,8 @@ surface_configure_notify(struct wl_listener *listener, void *data)
struct ivi_shell_surface,
configured_listener);
int32_t dest_width = 0;
int32_t dest_height = 0;
ivi_layout_surface_get_dimension(layout_surf,
&dest_width, &dest_height);
int32_t dest_width = layout_surf->prop.dest_width;
int32_t dest_height = layout_surf->prop.dest_height;
if (shell_surf->resource)
ivi_surface_send_configure(shell_surf->resource,

View File

@ -96,17 +96,10 @@ static void
test_surface_bad_dimension(struct test_context *ctx)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf = NULL;
int32_t dest_width;
int32_t dest_height;
iassert(lyt->surface_set_dimension(NULL, 200, 300) == IVI_FAILED);
lyt->commit_changes();
iassert(lyt->surface_get_dimension(NULL, &dest_width, &dest_height) == IVI_FAILED);
iassert(lyt->surface_get_dimension(ivisurf, NULL, &dest_height) == IVI_FAILED);
iassert(lyt->surface_get_dimension(ivisurf, &dest_width, NULL) == IVI_FAILED);
}
static void

View File

@ -426,32 +426,23 @@ RUNNER_TEST(surface_dimension)
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
const struct ivi_layout_surface_properties *prop;
int32_t dest_width;
int32_t dest_height;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf != NULL);
runner_assert(lyt->surface_get_dimension(
ivisurf, &dest_width, &dest_height) == IVI_SUCCEEDED);
runner_assert(dest_width == 1);
runner_assert(dest_height == 1);
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert_or_return(prop);
runner_assert(prop->dest_width == 1);
runner_assert(prop->dest_height == 1);
runner_assert(IVI_SUCCEEDED ==
lyt->surface_set_dimension(ivisurf, 200, 300));
runner_assert(lyt->surface_get_dimension(
ivisurf, &dest_width, &dest_height) == IVI_SUCCEEDED);
runner_assert(dest_width == 1);
runner_assert(dest_height == 1);
runner_assert(prop->dest_width == 1);
runner_assert(prop->dest_height == 1);
lyt->commit_changes();
runner_assert(lyt->surface_get_dimension(
ivisurf, &dest_width, &dest_height) == IVI_SUCCEEDED);
runner_assert(dest_width == 200);
runner_assert(dest_height == 300);
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert_or_return(prop);
runner_assert(prop->dest_width == 200);
@ -491,8 +482,6 @@ RUNNER_TEST(surface_destination_rectangle)
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
const struct ivi_layout_surface_properties *prop;
int32_t dest_width;
int32_t dest_height;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf != NULL);
@ -516,11 +505,6 @@ RUNNER_TEST(surface_destination_rectangle)
lyt->commit_changes();
runner_assert(lyt->surface_get_dimension(
ivisurf, &dest_width, &dest_height) == IVI_SUCCEEDED);
runner_assert(dest_width == 200);
runner_assert(dest_height == 300);
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert_or_return(prop);
runner_assert(prop->dest_width == 200);