Whenever shell_surface_send_configure() is called
weston_desktop_surface_set_size() should be used instead for desktop
surfaces. It is already done for IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY, do
it everywhere else too.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
I wrote comments on which list they are used with
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: fix surface_list to layer_list, add ivi_layout_transition_set::transition_list]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Now that ivi-layout calls directly into ivi-shell.c, this signal is no
longer used. Remove it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
For some reason, it seems that ivi-layout.c has tried hard to avoid
calling directly into ivi-shell.c. This means there is a jump through
hoops just to get the configure event sent to the clients. Ivi-shell
registers a listener for a ivi-layout signal for sending the event.
Instead, let ivi-layout.c call directly into ivi-shell.c, and expose a
function to send out the configure events. This reduces some confusion
on who calls what.
The main idea though is that this makes ivi-shell.c not depend on struct
ivi_layout_surface fields directly anymore. In following patches,
ivi_layout_surface can be made opaque for ivi-shell.c.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Every .c file must include config.h as the first thing.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
If surface transitions are not removed when surface is being removed, it
can lead to crash later when transition will finish, as it will try to
reference already freed memory.
This change exposes function that can remove all existing transitions
for given surface and it is being called during surface cleanup.
Signed-off-by: Mateusz Polrola <mateuszx.potrola@intel.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Check the return from layout_transition_register in order to fix
potential leak of memory pointed to by transition. And don't register a
null transition.
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Several fixes to handle invalid transition objects:
1. Free transition in ivi_layout_transition_fade_layer if we fail to
allocate memory for data
2. Check if transition is not null and if layout_transition_register was
ok before return, if not, free transition
3. Destroy transition if layout_transition_register was not ok, we can't
just free transition, we need to call layout_transition_destroy in
order to free private_data from transition
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
create_layout_transition does not initialize is_transition_func.
This patch initializes it to NULL.
Signed-off-by: John-John Tedro <johnjohn.tedro@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
layout_transition_register could not work and we need to free trans in
the calling function.
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Free transition before return. We don't need to use layout_transition_destroy,
because transition was not registered yet.
v2: consolidate memory leaks fixes
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
- opening braces are on the same line as the if statement
- opening braces are not on the same line as the function name
- space between for/while/if and opening parenthesis
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Thanks Pekka for pointing that out.
Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This fixes the breakage caused by "ivi-shell: make ivi-layout.c as a
part of ivi-shell.so"
hmi-controller.c:
A reference implementation of controller module does not use the layout
functions directly. This get function pointers at controller_module_init
which called by ivi-shell.
ivi-layout-export.h:
Definition of interfaces in a struction: ivi_controller_interface.
function pointers are set at ivi-layout.c.
ivi-layout-private.h:
Definition of some interfaces are remove bucause it is implemented in
ivi-layout.c and set it as function pointer. Several interfaces are kept
here because they are implemented in ivi-layout.c/transition.c but used
in other files.
ivi-layout-transition.c:
remove WL_EXPORT because export is not needed anymore.
remove unnesesary unsed method.
ivi-shell.c:
call controller_module_init of hmi-controller to init it and set
function pointers. If the interface_version is equal or
greater than what hmi_controller was built with, things are pass.
If the interface_version is smaller than what the controller expects,
it has to fail because it cannot work. This is followed the manner,
- never remove a function pointer
- never modify an existing function signature
- additions are allowed at the end of struct ivi_controller_interface
- all function pointers must always be populated and working in
ivi-shell.so (ivi-layout.c etc.)
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Interfaces for properties setting shall be implemented in ivi-layout.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi_layout_transition_layer_render_order is not necesary called. Remove
the method and methods called by it.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
- ivi-layout.so
- introduces ivi-layout-export.h, ivi-layout.[ch]
API set of controlling properties of surface and layer which groups
surfaces. An unique ID whose type is integer is required to create
surface and layer. With the unique ID, surface and layer are identified
to control them. The API set consists of APIs to control properties of
surface and layers about followings,
- visibility.
- opacity.
- clipping (x,y,width,height).
- position and size of it to be displayed.
- orientation per 90 degree.
- add or remove surfaces to a layer.
- order of surfaces/layers in layer/screen to be displayed.
- commit to apply property changes.
- notifications of property change.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>