[PATCH weston v3] ivi-shell: add_screen_remove_layer API

Teyfel, Michael (ADITG/ESB) mteyfel at de.adit-jv.com
Tue Jul 25 14:00:26 UTC 2017


Hi Pekka, hi Emre,

the test is implemented and also tested.


Best regards

Michael Teyfel
Engineering Software Base (ADITG/ESB)

Tel. +49 5121 49 6932

-----Original Message-----
From: Ucan, Emre (ADITG/ESB) 
Sent: Montag, 24. Juli 2017 16:34
To: Pekka Paalanen
Cc: Eugen Friedrich; wayland-devel at lists.freedesktop.org; Teyfel, Michael (ADITG/ESB)
Subject: RE: [PATCH weston v3] ivi-shell: add_screen_remove_layer API

Hi Pekka,

We will implement a test for the API. No Problem.

Best regards

Emre Ucan
Engineering Software Base (ADITG/ESB)

Tel. +49 5121 49 6937

> -----Original Message-----
> From: Pekka Paalanen [mailto:ppaalanen at gmail.com]
> Sent: Montag, 24. Juli 2017 12:40
> To: Ucan, Emre (ADITG/ESB)
> Cc: Eugen Friedrich; wayland-devel at lists.freedesktop.org
> Subject: Re: [PATCH weston v3] ivi-shell: add_screen_remove_layer API
> 
> On Thu, 13 Apr 2017 17:15:51 +0200
> Eugen Friedrich <friedrix at gmail.com> wrote:
> 
> > 2017-03-02 9:47 GMT+01:00 Ucan, Emre (ADITG/SW1) <eucan at de.adit-
> jv.com>:
> > > It is analagous to layer_remove_surface API.
> > > The API removes a layer from the render order of the screen.
> > >
> > > v3:
> > > add the new vfunc at the end of
> > > the ivi_layout_interface struct.
> > >
> > > Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> > > ---
> > >  ivi-shell/ivi-layout-export.h |   10 ++++++++++
> > >  ivi-shell/ivi-layout.c        |   22 ++++++++++++++++++++++
> > >  2 files changed, 32 insertions(+)
> > >
> > > diff --git a/ivi-shell/ivi-layout-export.h 
> > > b/ivi-shell/ivi-layout-export.h index 2317d6e..39ffde1 100644
> > > --- a/ivi-shell/ivi-layout-export.h
> > > +++ b/ivi-shell/ivi-layout-export.h
> > > @@ -578,6 +578,16 @@ struct ivi_layout_interface {
> > >          */
> > >         struct ivi_layout_surface *
> > >                 (*get_surface)(struct weston_surface *surface);
> > > +
> > > +       /**
> > > +        * \brief Remove a ivi_layer to a weston_output which is 
> > > + currently
> managed
> > > +        * by the service
> > > +        *
> > > +        * \return IVI_SUCCEEDED if the method call was successful
> > > +        * \return IVI_FAILED if the method call was failed
> > > +        */
> > > +       int32_t (*screen_remove_layer)(struct weston_output *output,
> > > +                                      struct ivi_layout_layer 
> > > + *removelayer);
> > >  };
> > >
> > >  #ifdef __cplusplus
> > > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 
> > > 64e4ead..5edf88b 100644
> > > --- a/ivi-shell/ivi-layout.c
> > > +++ b/ivi-shell/ivi-layout.c
> > > @@ -1663,6 +1663,27 @@ ivi_layout_screen_add_layer(struct
> weston_output *output,
> > >  }
> > >
> > >  static int32_t
> > > +ivi_layout_screen_remove_layer(struct weston_output *output,
> > > +                           struct ivi_layout_layer *removelayer) 
> > > +{
> > > +       struct ivi_layout_screen *iviscrn;
> > > +
> > > +       if (output == NULL || removelayer == NULL) {
> > > +               weston_log("ivi_layout_screen_remove_layer: 
> > > + invalid
> argument\n");
> > > +               return IVI_FAILED;
> > > +       }
> > > +
> > > +       iviscrn = get_screen_from_output(output);
> > > +
> > > +       wl_list_remove(&removelayer->pending.link);
> > > +       wl_list_init(&removelayer->pending.link);
> > > +
> > > +       iviscrn->order.dirty = 1;
> > > +
> > > +       return IVI_SUCCEEDED;
> > > +}
> > > +
> > > +static int32_t
> > >  ivi_layout_screen_set_render_order(struct weston_output *output,
> > >                                    struct ivi_layout_layer **pLayer,
> > >                                    const int32_t number) @@ 
> > > -2087,6 +2108,7 @@ static struct ivi_layout_interface
> ivi_layout_interface = {
> > >          */
> > >         .get_screens_under_layer        =
> ivi_layout_get_screens_under_layer,
> > >         .screen_add_layer               = ivi_layout_screen_add_layer,
> > > +       .screen_remove_layer            = ivi_layout_screen_remove_layer,
> > >         .screen_set_render_order        =
> ivi_layout_screen_set_render_order,
> > >
> > >         /**
> > > --
> > > 1.7.9.5
> > >
> > > _______________________________________________
> > > wayland-devel mailing list
> > > wayland-devel at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> >
> > Hi Emre,
> > api is definitely use full!
> >
> > Reviewed-by: Eugen Friedrich <friedrix at gmail.com>
> 
> Hi,
> 
> R-b me, but this new function is missing tests I believe. Would be 
> nice to get one, as the existing API has tests even for pretty trivial 
> things.
> 
> Pushed:
>    3e5303da..57ac260c  master -> master
> 
> 
> Thanks,
> pq


More information about the wayland-devel mailing list