ivi-shell: remove ivi_layout_surface_get_opacity 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 17610f240b
commit 995e6fbcd0
  1. 8
      ivi-shell/ivi-layout-export.h
  2. 2
      ivi-shell/ivi-layout-private.h
  3. 6
      ivi-shell/ivi-layout-transition.c
  4. 12
      ivi-shell/ivi-layout.c
  5. 24
      tests/ivi_layout-test-plugin.c

@ -288,14 +288,6 @@ struct ivi_layout_interface {
int32_t (*surface_set_opacity)(struct ivi_layout_surface *ivisurf,
wl_fixed_t opacity);
/**
* \brief Get the opacity of a ivi_surface.
*
* \return opacity if the method call was successful
* \return wl_fixed_from_double(0.0) if the method call was failed
*/
wl_fixed_t (*surface_get_opacity)(struct ivi_layout_surface *ivisurf);
/**
* \brief Set the area of a ivi_surface which should be used for the rendering.
*

@ -191,8 +191,6 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
int32_t
ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
wl_fixed_t opacity);
wl_fixed_t
ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
int32_t
ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
bool newVisibility);

@ -540,7 +540,7 @@ ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
{
struct ivi_layout_transition *transition;
bool is_visible = surface->prop.visibility;
wl_fixed_t dest_alpha = ivi_layout_surface_get_opacity(surface);
wl_fixed_t dest_alpha = surface->prop.opacity;
struct store_alpha *user_data = NULL;
wl_fixed_t start_alpha = 0.0;
struct fade_view_data *data = NULL;
@ -549,7 +549,7 @@ ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
IVI_LAYOUT_TRANSITION_VIEW_FADE,
surface);
if (transition) {
start_alpha = ivi_layout_surface_get_opacity(surface);
start_alpha = surface->prop.opacity;
user_data = transition->user_data;
data = transition->private_data;
@ -604,7 +604,7 @@ ivi_layout_transition_visibility_off(struct ivi_layout_surface *surface,
uint32_t duration)
{
struct ivi_layout_transition *transition;
wl_fixed_t start_alpha = ivi_layout_surface_get_opacity(surface);
wl_fixed_t start_alpha = surface->prop.opacity;
struct store_alpha* user_data = NULL;
struct fade_view_data* data = NULL;

@ -2072,17 +2072,6 @@ ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
return IVI_SUCCEEDED;
}
wl_fixed_t
ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf)
{
if (ivisurf == NULL) {
weston_log("ivi_layout_surface_get_opacity: invalid argument\n");
return wl_fixed_from_double(0.0);
}
return ivisurf->prop.opacity;
}
int32_t
ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
int32_t x, int32_t y,
@ -2724,7 +2713,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.get_surfaces_on_layer = ivi_layout_get_surfaces_on_layer,
.surface_set_visibility = ivi_layout_surface_set_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,
.surface_set_destination_rectangle = ivi_layout_surface_set_destination_rectangle,
.surface_set_position = ivi_layout_surface_set_position,

@ -375,27 +375,21 @@ RUNNER_TEST(surface_opacity)
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
int32_t ret;
wl_fixed_t opacity;
const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf);
runner_assert(lyt->surface_get_opacity(ivisurf) ==
wl_fixed_from_double(1.0));
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert(prop->opacity == wl_fixed_from_double(1.0));
ret = lyt->surface_set_opacity(ivisurf, wl_fixed_from_double(0.5));
runner_assert(ret == IVI_SUCCEEDED);
runner_assert(lyt->surface_get_opacity(ivisurf) ==
wl_fixed_from_double(1.0));
runner_assert(prop->opacity == wl_fixed_from_double(1.0));
lyt->commit_changes();
opacity = lyt->surface_get_opacity(ivisurf);
runner_assert(opacity == wl_fixed_from_double(0.5));
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert(prop->opacity == wl_fixed_from_double(0.5));
}
@ -590,7 +584,7 @@ RUNNER_TEST(surface_bad_opacity)
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
wl_fixed_t opacity;
const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf != NULL);
@ -606,24 +600,20 @@ RUNNER_TEST(surface_bad_opacity)
lyt->commit_changes();
opacity = lyt->surface_get_opacity(ivisurf);
runner_assert(opacity == wl_fixed_from_double(0.3));
prop = lyt->get_properties_of_surface(ivisurf);
runner_assert(prop->opacity == wl_fixed_from_double(0.3));
runner_assert(lyt->surface_set_opacity(
ivisurf, wl_fixed_from_double(1.1)) == IVI_FAILED);
lyt->commit_changes();
opacity = lyt->surface_get_opacity(ivisurf);
runner_assert(opacity == wl_fixed_from_double(0.3));
runner_assert(prop->opacity == wl_fixed_from_double(0.3));
runner_assert(lyt->surface_set_opacity(
NULL, wl_fixed_from_double(0.5)) == IVI_FAILED);
lyt->commit_changes();
opacity = lyt->surface_get_opacity(NULL);
runner_assert(opacity == wl_fixed_from_double(0.0));
}
RUNNER_TEST(ivi_layout_commit_changes)

Loading…
Cancel
Save