diff options
author | Ucan, Emre (ADITG/SW1) <eucan@de.adit-jv.com> | 2017-03-03 14:21:31 +0000 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-07-24 13:33:00 +0300 |
commit | 6e423ed99672f5fc0c672e3601528c2c0d668ec8 (patch) | |
tree | 3bb5f4d63f55416db8f899e0aaedb05405961d6a | |
parent | 9337197f8223897c7bbd17a33ad9d2a55ef89ddb (diff) |
ivi-shell: remove layer_set_orientation API
This API is used to rotate the contents of
application's buffer, which are in the render
order list of the layer. But this API is not
needed because an application can rotate
its buffers with set_buffer_transform request
of wl_surface interface
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | ivi-shell/ivi-layout-export.h | 9 | ||||
-rw-r--r-- | ivi-shell/ivi-layout.c | 23 | ||||
-rw-r--r-- | tests/ivi_layout-internal-test.c | 54 |
3 files changed, 0 insertions, 86 deletions
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index f8802544..afbb1101 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -453,15 +453,6 @@ struct ivi_layout_interface { int32_t width, int32_t height); /** - * \brief Sets the orientation of a ivi_layer. - * - * \return IVI_SUCCEEDED if the method call was successful - * \return IVI_FAILED if the method call was failed - */ - int32_t (*layer_set_orientation)(struct ivi_layout_layer *ivilayer, - enum wl_output_transform orientation); - - /** * \brief Add a ivi_surface to a ivi_layer which is currently managed by the service * * \return IVI_SUCCEEDED if the method call was successful diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 3a0d3198..60e381c3 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1489,28 +1489,6 @@ ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer, return IVI_SUCCEEDED; } -static int32_t -ivi_layout_layer_set_orientation(struct ivi_layout_layer *ivilayer, - enum wl_output_transform orientation) -{ - struct ivi_layout_layer_properties *prop = NULL; - - if (ivilayer == NULL) { - weston_log("ivi_layout_layer_set_orientation: invalid argument\n"); - return IVI_FAILED; - } - - prop = &ivilayer->pending.prop; - prop->orientation = orientation; - - if (ivilayer->prop.orientation != orientation) - prop->event_mask |= IVI_NOTIFICATION_ORIENTATION; - else - prop->event_mask &= ~IVI_NOTIFICATION_ORIENTATION; - - return IVI_SUCCEEDED; -} - int32_t ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer, struct ivi_layout_surface **pSurface, @@ -2074,7 +2052,6 @@ static struct ivi_layout_interface ivi_layout_interface = { .layer_set_opacity = ivi_layout_layer_set_opacity, .layer_set_source_rectangle = ivi_layout_layer_set_source_rectangle, .layer_set_destination_rectangle = ivi_layout_layer_set_destination_rectangle, - .layer_set_orientation = ivi_layout_layer_set_orientation, .layer_add_surface = ivi_layout_layer_add_surface, .layer_remove_surface = ivi_layout_layer_remove_surface, .layer_set_render_order = ivi_layout_layer_set_render_order, diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c index f5e2763f..e56eb125 100644 --- a/tests/ivi_layout-internal-test.c +++ b/tests/ivi_layout-internal-test.c @@ -180,31 +180,6 @@ test_layer_opacity(struct test_context *ctx) } static void -test_layer_orientation(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; - - ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300); - iassert(ivilayer != NULL); - - prop = lyt->get_properties_of_layer(ivilayer); - iassert(prop->orientation == WL_OUTPUT_TRANSFORM_NORMAL); - - iassert(lyt->layer_set_orientation( - ivilayer, WL_OUTPUT_TRANSFORM_90) == IVI_SUCCEEDED); - - iassert(prop->orientation == WL_OUTPUT_TRANSFORM_NORMAL); - - lyt->commit_changes(); - - iassert(prop->orientation == WL_OUTPUT_TRANSFORM_90); - - lyt->layer_destroy(ivilayer); -} - -static void test_layer_dimension(struct test_context *ctx) { const struct ivi_layout_interface *lyt = ctx->layout_interface; @@ -398,17 +373,6 @@ test_layer_bad_destination_rectangle(struct test_context *ctx) } static void -test_layer_bad_orientation(struct test_context *ctx) -{ - const struct ivi_layout_interface *lyt = ctx->layout_interface; - - iassert(lyt->layer_set_orientation( - NULL, WL_OUTPUT_TRANSFORM_90) == IVI_FAILED); - - lyt->commit_changes(); -} - -static void test_layer_bad_source_rectangle(struct test_context *ctx) { const struct ivi_layout_interface *lyt = ctx->layout_interface; @@ -455,21 +419,6 @@ test_commit_changes_after_opacity_set_layer_destroy(struct test_context *ctx) } static void -test_commit_changes_after_orientation_set_layer_destroy(struct test_context *ctx) -{ - const struct ivi_layout_interface *lyt = ctx->layout_interface; - struct ivi_layout_layer *ivilayer; - - ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300); - iassert(ivilayer != NULL); - - iassert(lyt->layer_set_orientation( - ivilayer, WL_OUTPUT_TRANSFORM_90) == IVI_SUCCEEDED); - lyt->layer_destroy(ivilayer); - lyt->commit_changes(); -} - -static void test_commit_changes_after_source_rectangle_set_layer_destroy(struct test_context *ctx) { const struct ivi_layout_interface *lyt = ctx->layout_interface; @@ -937,7 +886,6 @@ run_internal_tests(void *data) test_layer_create(ctx); test_layer_visibility(ctx); test_layer_opacity(ctx); - test_layer_orientation(ctx); test_layer_dimension(ctx); test_layer_position(ctx); test_layer_destination_rectangle(ctx); @@ -946,12 +894,10 @@ run_internal_tests(void *data) test_layer_bad_visibility(ctx); test_layer_bad_opacity(ctx); test_layer_bad_destination_rectangle(ctx); - test_layer_bad_orientation(ctx); test_layer_bad_source_rectangle(ctx); test_layer_bad_properties(ctx); test_commit_changes_after_visibility_set_layer_destroy(ctx); test_commit_changes_after_opacity_set_layer_destroy(ctx); - test_commit_changes_after_orientation_set_layer_destroy(ctx); test_commit_changes_after_source_rectangle_set_layer_destroy(ctx); test_commit_changes_after_destination_rectangle_set_layer_destroy(ctx); test_layer_create_duplicate(ctx); |