diff --git a/doc/sphinx/toc/ivi-shell.rst b/doc/sphinx/toc/ivi-shell.rst index 42eb5fe59..7755a228a 100644 --- a/doc/sphinx/toc/ivi-shell.rst +++ b/doc/sphinx/toc/ivi-shell.rst @@ -86,7 +86,8 @@ the surface was added to. However, the views are not provided to the IVI controller. After configuring all expected changes, the controller must call the -``commit_changes`` to atomically update the display layout. +``commit_changes`` to atomically update the display layout and call +``screen_ready`` to inform the compositor that it can start issueing repaints. IVI-shell example implementation -------------------------------- diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c index 4e774f216..0bbfa2c6e 100644 --- a/ivi-shell/hmi-controller.c +++ b/ivi-shell/hmi-controller.c @@ -1455,6 +1455,8 @@ ivi_hmi_controller_UI_ready(struct wl_client *client, hmi_ctrl->interface->commit_changes(); ivi_hmi_controller_add_launchers(hmi_ctrl, 256); + + hmi_ctrl->interface->screen_ready(hmi_ctrl->workspace_background_output); hmi_ctrl->is_initialized = 1; } diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h index 1b04e9a66..32edfcfec 100644 --- a/ivi-shell/ivi-layout-export.h +++ b/ivi-shell/ivi-layout-export.h @@ -647,6 +647,12 @@ struct ivi_layout_interface { * See add_listener_show_input_panel for more details. */ void (*add_listener_update_input_panel)(struct wl_listener *listener); + + /** + * \brief Set weston_output ready to be painted + */ + void (*screen_ready)(struct weston_output *output); + }; static inline const struct ivi_layout_interface * diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 9d15e8ca0..9b4d46cd4 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -91,8 +91,6 @@ struct ivi_layout_screen { int dirty; struct wl_list layer_list; /* ivi_layout_layer::order.link */ } order; - - struct weston_curtain *temporary_curtain; }; struct ivi_rectangle @@ -282,8 +280,6 @@ destroy_screen(struct ivi_layout_screen *iviscrn) assert(wl_list_empty(&iviscrn->order.layer_list)); - weston_shell_utils_curtain_destroy(iviscrn->temporary_curtain); - wl_list_remove(&iviscrn->link); free(iviscrn); } @@ -318,42 +314,10 @@ create_screen(struct weston_output *output) return iviscrn; } -static int -ivi_shell_temporary_curtain_get_label(struct weston_surface *surface, - char *buf, size_t len) -{ - return snprintf(buf, len, "ivi-shell background placeholder"); -} - static void create_ivi_screen(struct ivi_layout *layout, struct weston_output *output) { - struct weston_curtain_params curtain_params = {}; - struct ivi_layout_screen *iviscrn = NULL; - - iviscrn = create_screen(output); - - curtain_params.a = 1.0; - curtain_params.pos = output->pos; - curtain_params.width = output->width; - curtain_params.height = output->height; - curtain_params.capture_input = true; - curtain_params.get_label = ivi_shell_temporary_curtain_get_label; - - iviscrn->temporary_curtain = - weston_shell_utils_curtain_create(output->compositor, - &curtain_params); - - weston_surface_set_role(iviscrn->temporary_curtain->view->surface, - "ivi-shell-background-placeholder", NULL, 0); - - iviscrn->temporary_curtain->view->surface->output = output; - - weston_view_move_to_layer(iviscrn->temporary_curtain->view, - &layout->layout_layer.view_list); - weston_view_set_output(iviscrn->temporary_curtain->view, output); - - weston_output_set_ready(output); + create_screen(output); } static void @@ -1609,6 +1573,12 @@ ivi_layout_screen_set_render_order(struct weston_output *output, iviscrn->order.dirty = 1; } +static void +ivi_layout_set_screen_ready(struct weston_output *output) +{ + weston_output_set_ready(output); +} + /** * This function is used by the additional ivi-module because of dumping ivi_surface sceenshot. * The ivi-module, e.g. ivi-controller.so, is in wayland-ivi-extension of Genivi's Layer Management. @@ -2277,6 +2247,7 @@ static struct ivi_layout_interface ivi_layout_interface = { .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, + .screen_ready = ivi_layout_set_screen_ready, /** * animation