Commit 9337197f authored by eucan's avatar eucan Committed by Pekka Paalanen

ivi-shell: remove surface_set_orientation API

This API is used to rotate the contents of
application's buffer. But it is not needed
because an application can rotate its buffers
with set_buffer_transform request of
wl_surface interface.
Signed-off-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent deee858b
......@@ -275,15 +275,6 @@ struct ivi_layout_interface {
int32_t x, int32_t y,
int32_t width, int32_t height);
/**
* \brief Sets the orientation of a ivi_surface.
*
* \return IVI_SUCCEEDED if the method call was successful
* \return IVI_FAILED if the method call was failed
*/
int32_t (*surface_set_orientation)(struct ivi_layout_surface *ivisurf,
enum wl_output_transform orientation);
/**
* \brief add a listener to listen property changes of ivi_surface
*
......
......@@ -1620,28 +1620,6 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
return IVI_SUCCEEDED;
}
static int32_t
ivi_layout_surface_set_orientation(struct ivi_layout_surface *ivisurf,
enum wl_output_transform orientation)
{
struct ivi_layout_surface_properties *prop = NULL;
if (ivisurf == NULL) {
weston_log("ivi_layout_surface_set_orientation: invalid argument\n");
return IVI_FAILED;
}
prop = &ivisurf->pending.prop;
prop->orientation = orientation;
if (ivisurf->prop.orientation != orientation)
prop->event_mask |= IVI_NOTIFICATION_ORIENTATION;
else
prop->event_mask &= ~IVI_NOTIFICATION_ORIENTATION;
return IVI_SUCCEEDED;
}
static int32_t
ivi_layout_screen_add_layer(struct weston_output *output,
struct ivi_layout_layer *addlayer)
......@@ -2074,7 +2052,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.surface_set_opacity = ivi_layout_surface_set_opacity,
.surface_set_source_rectangle = ivi_layout_surface_set_source_rectangle,
.surface_set_destination_rectangle = ivi_layout_surface_set_destination_rectangle,
.surface_set_orientation = ivi_layout_surface_set_orientation,
.surface_add_listener = ivi_layout_surface_add_listener,
.surface_get_weston_surface = ivi_layout_surface_get_weston_surface,
.surface_set_transition = ivi_layout_surface_set_transition,
......
......@@ -88,14 +88,6 @@ test_surface_bad_destination_rectangle(struct test_context *ctx)
iassert(lyt->surface_set_destination_rectangle(NULL, 20, 30, 200, 300) == IVI_FAILED);
}
static void
test_surface_bad_orientation(struct test_context *ctx)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
iassert(lyt->surface_set_orientation(NULL, WL_OUTPUT_TRANSFORM_90) == IVI_FAILED);
}
static void
test_surface_bad_source_rectangle(struct test_context *ctx)
{
......@@ -939,7 +931,6 @@ run_internal_tests(void *data)
test_surface_bad_visibility(ctx);
test_surface_bad_destination_rectangle(ctx);
test_surface_bad_orientation(ctx);
test_surface_bad_source_rectangle(ctx);
test_surface_bad_properties(ctx);
......
......@@ -400,29 +400,6 @@ RUNNER_TEST(surface_opacity)
runner_assert(prop->opacity == wl_fixed_from_double(0.5));
}
RUNNER_TEST(surface_orientation)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf != NULL);
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert_or_return(prop);
runner_assert(prop->orientation == WL_OUTPUT_TRANSFORM_NORMAL);
runner_assert(lyt->surface_set_orientation(
ivisurf, WL_OUTPUT_TRANSFORM_90) == IVI_SUCCEEDED);
runner_assert(prop->orientation == WL_OUTPUT_TRANSFORM_NORMAL);
lyt->commit_changes();
runner_assert(prop->orientation == WL_OUTPUT_TRANSFORM_90);
}
RUNNER_TEST(surface_dimension)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
......@@ -663,17 +640,6 @@ RUNNER_TEST(commit_changes_after_opacity_set_surface_destroy)
ivisurf, wl_fixed_from_double(0.5)) == IVI_SUCCEEDED);
}
RUNNER_TEST(commit_changes_after_orientation_set_surface_destroy)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf != NULL);
runner_assert(lyt->surface_set_orientation(
ivisurf, WL_OUTPUT_TRANSFORM_90) == IVI_SUCCEEDED);
}
RUNNER_TEST(commit_changes_after_source_rectangle_set_surface_destroy)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
......
......@@ -192,7 +192,6 @@ ivi_window_destroy(struct ivi_window *wnd)
const char * const basic_test_names[] = {
"surface_visibility",
"surface_opacity",
"surface_orientation",
"surface_dimension",
"surface_position",
"surface_destination_rectangle",
......@@ -206,7 +205,6 @@ const char * const basic_test_names[] = {
const char * const surface_property_commit_changes_test_names[] = {
"commit_changes_after_visibility_set_surface_destroy",
"commit_changes_after_opacity_set_surface_destroy",
"commit_changes_after_orientation_set_surface_destroy",
"commit_changes_after_source_rectangle_set_surface_destroy",
"commit_changes_after_destination_rectangle_set_surface_destroy",
};
......
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