From 9337197f8223897c7bbd17a33ad9d2a55ef89ddb Mon Sep 17 00:00:00 2001 From: "Ucan, Emre (ADITG/SW1)" Date: Fri, 3 Mar 2017 14:21:28 +0000 Subject: [PATCH] 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: Emre Ucan Reviewed-by: Pekka Paalanen --- ivi-shell/ivi-layout-export.h | 9 --------- ivi-shell/ivi-layout.c | 23 ----------------------- tests/ivi_layout-internal-test.c | 9 --------- tests/ivi_layout-test-plugin.c | 34 ---------------------------------- tests/ivi_layout-test.c | 2 -- 5 files changed, 77 deletions(-) diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index 39ffde1..f880254 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -276,15 +276,6 @@ struct ivi_layout_interface { 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 * * When a property of the ivi_surface is changed, the property_changed diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 8e4280b..3a0d319 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1621,28 +1621,6 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf, } 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, diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c index 37a2356..f5e2763 100644 --- a/tests/ivi_layout-internal-test.c +++ b/tests/ivi_layout-internal-test.c @@ -89,14 +89,6 @@ test_surface_bad_destination_rectangle(struct test_context *ctx) } 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) { const struct ivi_layout_interface *lyt = ctx->layout_interface; @@ -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); diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c index 609c71f..19eab81 100644 --- a/tests/ivi_layout-test-plugin.c +++ b/tests/ivi_layout-test-plugin.c @@ -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; diff --git a/tests/ivi_layout-test.c b/tests/ivi_layout-test.c index 86e63b1..d2f4c93 100644 --- a/tests/ivi_layout-test.c +++ b/tests/ivi_layout-test.c @@ -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", }; -- 2.7.4