ivi-shell: remove ivi_layout_surface_get_visibility 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>
dev
Ucan, Emre \(ADITG/SW1\) 9 years ago committed by Bryce Harrington
parent 9d8b4414d7
commit c6a138c6f0
  1. 10
      ivi-shell/ivi-layout-export.h
  2. 2
      ivi-shell/ivi-layout-private.h
  3. 2
      ivi-shell/ivi-layout-transition.c
  4. 12
      ivi-shell/ivi-layout.c
  5. 4
      tests/ivi_layout-internal-test.c
  6. 4
      tests/ivi_layout-test-plugin.c

@ -279,16 +279,6 @@ struct ivi_layout_interface {
int32_t (*surface_set_visibility)(struct ivi_layout_surface *ivisurf, int32_t (*surface_set_visibility)(struct ivi_layout_surface *ivisurf,
bool newVisibility); bool newVisibility);
/**
* \brief Get the visibility of a surface.
*
* If a surface is not visible it will not be rendered.
*
* \return true if surface is visible
* \return false if surface is invisible or the method call was failed
*/
bool (*surface_get_visibility)(struct ivi_layout_surface *ivisurf);
/** /**
* \brief Set the opacity of a surface. * \brief Set the opacity of a surface.
* *

@ -196,8 +196,6 @@ ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
int32_t int32_t
ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf, ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
bool newVisibility); bool newVisibility);
bool
ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf);
struct ivi_layout_surface * struct ivi_layout_surface *
ivi_layout_get_surface_from_id(uint32_t id_surface); ivi_layout_get_surface_from_id(uint32_t id_surface);
int32_t int32_t

@ -539,7 +539,7 @@ ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
uint32_t duration) uint32_t duration)
{ {
struct ivi_layout_transition *transition; struct ivi_layout_transition *transition;
bool is_visible = ivi_layout_surface_get_visibility(surface); bool is_visible = surface->prop.visibility;
wl_fixed_t dest_alpha = ivi_layout_surface_get_opacity(surface); wl_fixed_t dest_alpha = ivi_layout_surface_get_opacity(surface);
struct store_alpha *user_data = NULL; struct store_alpha *user_data = NULL;
wl_fixed_t start_alpha = 0.0; wl_fixed_t start_alpha = 0.0;

@ -2059,17 +2059,6 @@ ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
return IVI_SUCCEEDED; return IVI_SUCCEEDED;
} }
bool
ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf)
{
if (ivisurf == NULL) {
weston_log("ivi_layout_surface_get_visibility: invalid argument\n");
return false;
}
return ivisurf->prop.visibility;
}
int32_t int32_t
ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf, ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
wl_fixed_t opacity) wl_fixed_t opacity)
@ -2745,7 +2734,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.get_properties_of_surface = ivi_layout_get_properties_of_surface, .get_properties_of_surface = ivi_layout_get_properties_of_surface,
.get_surfaces_on_layer = ivi_layout_get_surfaces_on_layer, .get_surfaces_on_layer = ivi_layout_get_surfaces_on_layer,
.surface_set_visibility = ivi_layout_surface_set_visibility, .surface_set_visibility = ivi_layout_surface_set_visibility,
.surface_get_visibility = ivi_layout_surface_get_visibility,
.surface_set_opacity = ivi_layout_surface_set_opacity, .surface_set_opacity = ivi_layout_surface_set_opacity,
.surface_get_opacity = ivi_layout_surface_get_opacity, .surface_get_opacity = ivi_layout_surface_get_opacity,
.surface_set_source_rectangle = ivi_layout_surface_set_source_rectangle, .surface_set_source_rectangle = ivi_layout_surface_set_source_rectangle,

@ -68,14 +68,10 @@ static void
test_surface_bad_visibility(struct test_context *ctx) test_surface_bad_visibility(struct test_context *ctx)
{ {
const struct ivi_layout_interface *lyt = ctx->layout_interface; const struct ivi_layout_interface *lyt = ctx->layout_interface;
bool visibility;
iassert(lyt->surface_set_visibility(NULL, true) == IVI_FAILED); iassert(lyt->surface_set_visibility(NULL, true) == IVI_FAILED);
lyt->commit_changes(); lyt->commit_changes();
visibility = lyt->surface_get_visibility(NULL);
iassert(visibility == false);
} }
static void static void

@ -356,7 +356,6 @@ RUNNER_TEST(surface_visibility)
const struct ivi_layout_interface *lyt = ctx->layout_interface; const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf; struct ivi_layout_surface *ivisurf;
int32_t ret; int32_t ret;
bool visibility;
const struct ivi_layout_surface_properties *prop; const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0)); ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
@ -367,9 +366,6 @@ RUNNER_TEST(surface_visibility)
lyt->commit_changes(); lyt->commit_changes();
visibility = lyt->surface_get_visibility(ivisurf);
runner_assert(visibility == true);
prop = lyt->get_properties_of_surface(ivisurf); prop = lyt->get_properties_of_surface(ivisurf);
runner_assert(prop->visibility == true); runner_assert(prop->visibility == true);
} }

Loading…
Cancel
Save