ivi-shell: add commit_current into ivi_layout interface
If a client commits a null buffer, weston will unmap all the views of the surface and marks it is unmapping. In the case, the client commits a new valid buffer, then the controller wants to rebuild the views without applies the pending properties of surfaces and layers. The ivi_layout_interface should prodive an interface for this. Suggested-by: Michael Olbrich's avatarMichael Olbrich <m.olbrich@pengutronix.de> Suggested-by: K J Rajendraprasad's avatarRajendraprasad K J <KarammelJayakumar.Rajendraprasad@in.bosch.com> Signed-off-by: Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com>
This commit is contained in:
parent
5e7b4d0c00
commit
fe392d23b9
|
@ -152,6 +152,14 @@ struct ivi_layout_interface {
|
||||||
*/
|
*/
|
||||||
int32_t (*commit_changes)(void);
|
int32_t (*commit_changes)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Rebuild view list without applying any new changes
|
||||||
|
*
|
||||||
|
* \return IVI_SUCCEEDED if the method call was successful
|
||||||
|
* \return IVI_FAILED if the method call was failed
|
||||||
|
*/
|
||||||
|
int32_t (*commit_current)(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* surface controller interface
|
* surface controller interface
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1823,6 +1823,16 @@ ivi_layout_commit_changes(void)
|
||||||
return IVI_SUCCEEDED;
|
return IVI_SUCCEEDED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int32_t
|
||||||
|
ivi_layout_commit_current(void)
|
||||||
|
{
|
||||||
|
struct ivi_layout *layout = get_instance();
|
||||||
|
build_view_list(layout);
|
||||||
|
commit_changes(layout);
|
||||||
|
send_prop(layout);
|
||||||
|
return IVI_SUCCEEDED;
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
|
ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
|
||||||
enum ivi_layout_transition_type type,
|
enum ivi_layout_transition_type type,
|
||||||
|
@ -1983,6 +1993,7 @@ ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
|
||||||
int32_t width, int32_t height)
|
int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
struct ivi_layout *layout = get_instance();
|
struct ivi_layout *layout = get_instance();
|
||||||
|
ivisurf->prop.event_mask |= IVI_NOTIFICATION_CONFIGURE;
|
||||||
|
|
||||||
/* emit callback which is set by ivi-layout api user */
|
/* emit callback which is set by ivi-layout api user */
|
||||||
wl_signal_emit(&layout->surface_notification.configure_desktop_changed,
|
wl_signal_emit(&layout->surface_notification.configure_desktop_changed,
|
||||||
|
@ -2009,6 +2020,7 @@ ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
|
||||||
int32_t width, int32_t height)
|
int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
struct ivi_layout *layout = get_instance();
|
struct ivi_layout *layout = get_instance();
|
||||||
|
ivisurf->prop.event_mask |= IVI_NOTIFICATION_CONFIGURE;
|
||||||
|
|
||||||
/* emit callback which is set by ivi-layout api user */
|
/* emit callback which is set by ivi-layout api user */
|
||||||
wl_signal_emit(&layout->surface_notification.configure_changed,
|
wl_signal_emit(&layout->surface_notification.configure_changed,
|
||||||
|
@ -2107,6 +2119,7 @@ static struct ivi_layout_interface ivi_layout_interface = {
|
||||||
* commit all changes
|
* commit all changes
|
||||||
*/
|
*/
|
||||||
.commit_changes = ivi_layout_commit_changes,
|
.commit_changes = ivi_layout_commit_changes,
|
||||||
|
.commit_current = ivi_layout_commit_current,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* surface controller interfaces
|
* surface controller interfaces
|
||||||
|
|
|
@ -121,8 +121,10 @@ ivi_shell_surface_committed(struct weston_surface *surface,
|
||||||
{
|
{
|
||||||
struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface);
|
struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface);
|
||||||
|
|
||||||
if (surface->width == 0 || surface->height == 0)
|
if (surface->width == 0 || surface->height == 0) {
|
||||||
|
if (!weston_surface_is_unmapping(surface))
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ivisurf->width != surface->width ||
|
if (ivisurf->width != surface->width ||
|
||||||
ivisurf->height != surface->height) {
|
ivisurf->height != surface->height) {
|
||||||
|
@ -574,8 +576,10 @@ desktop_surface_committed(struct weston_desktop_surface *surface,
|
||||||
if(!ivisurf)
|
if(!ivisurf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (weston_surf->width == 0 || weston_surf->height == 0)
|
if (weston_surf->width == 0 || weston_surf->height == 0) {
|
||||||
|
if (!weston_surface_is_unmapping(weston_surf))
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ivisurf->width != weston_surf->width ||
|
if (ivisurf->width != weston_surf->width ||
|
||||||
ivisurf->height != weston_surf->height) {
|
ivisurf->height != weston_surf->height) {
|
||||||
|
|
Loading…
Reference in New Issue