[PATCH weston 01/14] ivi-shell: remove ivi_layout_surface_get_visibility API
Ucan, Emre (ADITG/SW1)
eucan at de.adit-jv.com
Fri Feb 26 15:58:00 UTC 2016
Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
ivi-shell/ivi-layout-export.h | 10 ----------
ivi-shell/ivi-layout-private.h | 2 --
ivi-shell/ivi-layout-transition.c | 2 +-
ivi-shell/ivi-layout.c | 12 ------------
tests/ivi_layout-internal-test.c | 4 ----
tests/ivi_layout-test-plugin.c | 4 ----
6 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 54af286..e36d2fc 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -280,16 +280,6 @@ struct ivi_layout_interface {
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.
*
* \return IVI_SUCCEEDED if the method call was successful
diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
index 3244390..342ef4a 100644
--- a/ivi-shell/ivi-layout-private.h
+++ b/ivi-shell/ivi-layout-private.h
@@ -196,8 +196,6 @@ ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
int32_t
ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
bool newVisibility);
-bool
-ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf);
struct ivi_layout_surface *
ivi_layout_get_surface_from_id(uint32_t id_surface);
int32_t
diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
index 483437d..fd8ce85 100644
--- a/ivi-shell/ivi-layout-transition.c
+++ b/ivi-shell/ivi-layout-transition.c
@@ -539,7 +539,7 @@ ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
uint32_t duration)
{
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);
struct store_alpha *user_data = NULL;
wl_fixed_t start_alpha = 0.0;
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index f7c4f27..f15ee32 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2059,17 +2059,6 @@ ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
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
ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
wl_fixed_t opacity)
@@ -2747,7 +2736,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.get_properties_of_surface = ivi_layout_get_properties_of_surface,
.get_surfaces_on_layer = ivi_layout_get_surfaces_on_layer,
.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_get_opacity = ivi_layout_surface_get_opacity,
.surface_set_source_rectangle = ivi_layout_surface_set_source_rectangle,
diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c
index d0c759b..ec4c8d3 100644
--- a/tests/ivi_layout-internal-test.c
+++ b/tests/ivi_layout-internal-test.c
@@ -68,14 +68,10 @@ static void
test_surface_bad_visibility(struct test_context *ctx)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
- bool visibility;
iassert(lyt->surface_set_visibility(NULL, true) == IVI_FAILED);
lyt->commit_changes();
-
- visibility = lyt->surface_get_visibility(NULL);
- iassert(visibility == false);
}
static void
diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
index f7b6c3c..e7bcee9 100644
--- a/tests/ivi_layout-test-plugin.c
+++ b/tests/ivi_layout-test-plugin.c
@@ -356,7 +356,6 @@ RUNNER_TEST(surface_visibility)
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
int32_t ret;
- bool visibility;
const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
@@ -367,9 +366,6 @@ RUNNER_TEST(surface_visibility)
lyt->commit_changes();
- visibility = lyt->surface_get_visibility(ivisurf);
- runner_assert(visibility == true);
-
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert(prop->visibility == true);
}
--
1.7.9.5
More information about the wayland-devel
mailing list