diff options
-rw-r--r-- | packaging/ico-uxf-weston-plugin.changes | 8 | ||||
-rw-r--r-- | src/ico_window_animation.c | 169 | ||||
-rw-r--r-- | src/ico_window_mgr.c | 32 |
3 files changed, 123 insertions, 86 deletions
diff --git a/packaging/ico-uxf-weston-plugin.changes b/packaging/ico-uxf-weston-plugin.changes index 64b903c..66e85a3 100644 --- a/packaging/ico-uxf-weston-plugin.changes +++ b/packaging/ico-uxf-weston-plugin.changes @@ -1,3 +1,11 @@ +* Thu Apr 03 2014 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/ivi/panda/20140403.020007@ff3b8c9 +- 0.9.22 release +-- bug fix: CPU is occupied in surface animation. +-- bug fix: TIVI-3000 - Sometimes it shows an U form black area at the botton of ICO homescreen. +-- bug fix: TIVI-3003 - system notification is shown as black screen for while incoming on ICO. +-- bug fix: Sometime Weston crashes at the time of the end of an application. +-- bug fix: The table of the surface of ivi-shell remains at the time of weston surface deletion. + * Fri Mar 28 2014 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/ivi/panda/20140326.234219@9f2534a - It follows in footsteps of change of weston-ivi-shell 0.1.3. - bug fix: TIVI-2953 - Don't call callback when destroy surface. diff --git a/src/ico_window_animation.c b/src/ico_window_animation.c index 0489486..22bfee7 100644 --- a/src/ico_window_animation.c +++ b/src/ico_window_animation.c @@ -479,7 +479,9 @@ animation_end(struct uifw_win_surface *usurf, const int disp) wl_list_remove(&animadata->transform.link); animadata->transform_set = 0; } - weston_view_geometry_dirty(ev); + if (ev) { + weston_view_geometry_dirty(ev); + } } if (disp) { usurf->restrain_configure = 0; @@ -491,7 +493,9 @@ animation_end(struct uifw_win_surface *usurf, const int disp) weston_layout_surfaceSetVisibility(usurf->ivisurf, 0); weston_layout_commitChanges(); weston_surface_damage(usurf->surface); - weston_view_geometry_dirty(ev); + if (ev) { + weston_view_geometry_dirty(ev); + } } if ((usurf->animation.visible == ANIMA_SHOW_AT_END) && (usurf->visible == 0)) { @@ -499,7 +503,9 @@ animation_end(struct uifw_win_surface *usurf, const int disp) weston_layout_surfaceSetVisibility(usurf->ivisurf, 1); weston_layout_commitChanges(); weston_surface_damage(usurf->surface); - weston_view_geometry_dirty(ev); + if (ev) { + weston_view_geometry_dirty(ev); + } } } usurf->animation.visible = ANIMA_NOCONTROL_AT_END; @@ -765,13 +771,15 @@ animation_wipe(struct weston_animation *animation, } } - ev->geometry.x = usurf->node_tbl->disp_x + x; - ev->geometry.y = usurf->node_tbl->disp_y + y; es->width = width; es->height = height; - if ((ev->output) && (es->buffer_ref.buffer)) { - weston_view_geometry_dirty(ev); - weston_surface_damage(es); + if (ev) { + ev->geometry.x = usurf->node_tbl->disp_x + x; + ev->geometry.y = usurf->node_tbl->disp_y + y; + if ((ev->output) && (es->buffer_ref.buffer)) { + weston_view_geometry_dirty(ev); + weston_surface_damage(es); + } } if (par >= 100) { /* end of animation */ @@ -832,8 +840,10 @@ animation_swing(struct weston_animation *animation, animadata->transform_set = 1; weston_matrix_init(&animadata->transform.matrix); wl_list_init(&animadata->transform.link); - wl_list_insert(&ev->geometry.transformation_list, - &animadata->transform.link); + if (ev) { + wl_list_insert(&ev->geometry.transformation_list, + &animadata->transform.link); + } } animadata->end_function = animation_swing_end; } @@ -894,8 +904,6 @@ animation_swing(struct weston_animation *animation, } } - ev->geometry.x = usurf->node_tbl->disp_x + x; - ev->geometry.y = usurf->node_tbl->disp_y + y; weston_matrix_init(&animadata->transform.matrix); weston_matrix_translate(&animadata->transform.matrix, -0.5f * usurf->width, -0.5f * usurf->height, 0); @@ -903,9 +911,13 @@ animation_swing(struct weston_animation *animation, weston_matrix_translate(&animadata->transform.matrix, 0.5f * usurf->width, 0.5f * usurf->height, 0); - if ((ev->output) && (es->buffer_ref.buffer)) { - weston_view_geometry_dirty(ev); - weston_surface_damage(es); + if (ev) { + ev->geometry.x = usurf->node_tbl->disp_x + x; + ev->geometry.y = usurf->node_tbl->disp_y + y; + if ((ev->output) && (es->buffer_ref.buffer)) { + weston_view_geometry_dirty(ev); + weston_surface_damage(es); + } } if (par >= 100) { /* end of animation */ @@ -937,11 +949,13 @@ animation_swing_end(struct weston_animation *animation) if (usurf && usurf->surface) { es = usurf->surface; ev = ico_ivi_get_primary_view(usurf); - ev->alpha = usurf->animation.alpha; - uifw_debug("animation_swing_end: %08x set alpha=%.2f", - usurf->surfaceid, usurf->animation.alpha); - if ((ev->output) && (es->buffer_ref.buffer)) { - weston_surface_damage(es); + if (ev) { + ev->alpha = usurf->animation.alpha; + uifw_debug("animation_swing_end: %08x set alpha=%.2f", + usurf->surfaceid, usurf->animation.alpha); + if ((ev->output) && (es->buffer_ref.buffer)) { + weston_surface_damage(es); + } } } } @@ -986,55 +1000,60 @@ animation_fade(struct weston_animation *animation, animadata->transform_set = 1; weston_matrix_init(&animadata->transform.matrix); wl_list_init(&animadata->transform.link); - wl_list_insert(&ev->geometry.transformation_list, - &animadata->transform.link); + if (ev) { + wl_list_insert(&ev->geometry.transformation_list, + &animadata->transform.link); + } } animadata->end_function = animation_fade_end; if ((usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPHIDEPOS) || (usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPSHOWPOS)) { ico_window_mgr_set_weston_surface(usurf, - usurf->animation.pos_x, usurf->animation.pos_y, + usurf->animation.pos_x, + usurf->animation.pos_y, usurf->animation.pos_width, usurf->animation.pos_height); } } - if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) { - /* fade in */ - ev->alpha = ((float)par) / 100.0f; - } - else if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_HIDE) { - /* fade out */ - ev->alpha = 1.0f - (((float)par) / 100.0f); - } - else { - /* fade move/resize */ - if ((par >= 50) || (usurf->animation.ahalf)) { - ev->alpha = ((float)(par*2 - 100)) / 100.0f; - if (usurf->animation.ahalf == 0) { - uifw_trace("animation_fade: fade move chaneg to show"); - usurf->animation.ahalf = 1; - ev->alpha = 0.0; - ico_window_mgr_set_weston_surface(usurf, usurf->x, usurf->y, - usurf->width, usurf->height); - } + if (ev) { + if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) { + /* fade in */ + ev->alpha = ((float)par) / 100.0f; + } + else if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_HIDE) { + /* fade out */ + ev->alpha = 1.0f - (((float)par) / 100.0f); } else { - ev->alpha = 1.0f - (((float)(par*2)) / 100.0f); + /* fade move/resize */ + if ((par >= 50) || (usurf->animation.ahalf)) { + ev->alpha = ((float)(par*2 - 100)) / 100.0f; + if (usurf->animation.ahalf == 0) { + uifw_trace("animation_fade: fade move chaneg to show"); + usurf->animation.ahalf = 1; + ev->alpha = 0.0; + ico_window_mgr_set_weston_surface(usurf, usurf->x, usurf->y, + usurf->width, usurf->height); + } + } + else { + ev->alpha = 1.0f - (((float)(par*2)) / 100.0f); + } + } + if (ev->alpha < 0.0f) ev->alpha = 0.0f; + else if (ev->alpha > 1.0f) ev->alpha = 1.0f; + + if ((par < 8) || (par > 92)) { + uifw_debug("animation_fade: %08x count=%d %d%% alpha=%1.2f anima=%d state=%d", + usurf->surfaceid, animation->frame_counter, par, + ev->alpha, usurf->animation.anima, usurf->animation.state); + } + if ((ev->output) && (es->buffer_ref.buffer) && + (es->width > 0) && (es->height > 0)) { + weston_surface_damage(es); } - } - if (ev->alpha < 0.0f) ev->alpha = 0.0f; - else if (ev->alpha > 1.0f) ev->alpha = 1.0f; - - if ((par < 8) || (par > 92)) { - uifw_debug("animation_fade: %08x count=%d %d%% alpha=%1.2f anima=%d state=%d", - usurf->surfaceid, animation->frame_counter, par, - ev->alpha, usurf->animation.anima, usurf->animation.state); - } - if ((ev->output) && (es->buffer_ref.buffer) && - (es->width > 0) && (es->height > 0)) { - weston_surface_damage(es); } if (par >= 100) { /* end of animation */ @@ -1066,12 +1085,14 @@ animation_fade_end(struct weston_animation *animation) if (usurf && usurf->surface) { es = usurf->surface; ev = ico_ivi_get_primary_view(usurf); - ev->alpha = usurf->animation.alpha; - uifw_debug("animation_fade_end: %08x set alpha=%.2f", - usurf->surfaceid, usurf->animation.alpha); - if ((ev->output) && (es->buffer_ref.buffer) && - (es->width > 0) && (es->height > 0)) { - weston_surface_damage(es); + if (ev) { + ev->alpha = usurf->animation.alpha; + uifw_debug("animation_fade_end: %08x set alpha=%.2f", + usurf->surfaceid, usurf->animation.alpha); + if ((ev->output) && (es->buffer_ref.buffer) && + (es->width > 0) && (es->height > 0)) { + weston_surface_damage(es); + } } } } @@ -1119,8 +1140,10 @@ animation_zoom(struct weston_animation *animation, animadata->transform_set = 1; weston_matrix_init(&animadata->transform.matrix); wl_list_init(&animadata->transform.link); - wl_list_insert(&ev->geometry.transformation_list, - &animadata->transform.link); + if (ev) { + wl_list_insert(&ev->geometry.transformation_list, + &animadata->transform.link); + } } animadata->end_function = animation_zoom_end; @@ -1179,10 +1202,12 @@ animation_zoom(struct weston_animation *animation, (int)(usurf->height * scaley), usurf->height, usurf->animation.anima, usurf->animation.state); - if ((ev->output) && (es->buffer_ref.buffer) && - (es->width > 0) && (es->height > 0)) { - weston_view_geometry_dirty(ev); - weston_surface_damage(es); + if (ev) { + if ((ev->output) && (es->buffer_ref.buffer) && + (es->width > 0) && (es->height > 0)) { + weston_view_geometry_dirty(ev); + weston_surface_damage(es); + } } if (par >= 100) { /* end of animation */ @@ -1214,10 +1239,12 @@ animation_zoom_end(struct weston_animation *animation) if (usurf && usurf->surface) { es = usurf->surface; ev = ico_ivi_get_primary_view(usurf); - ev->alpha = usurf->animation.alpha; - if ((ev->output) && (es->buffer_ref.buffer) && - (es->width > 0) && (es->height > 0)) { - weston_surface_damage(es); + if (ev) { + ev->alpha = usurf->animation.alpha; + if ((ev->output) && (es->buffer_ref.buffer) && + (es->width > 0) && (es->height > 0)) { + weston_surface_damage(es); + } } } } diff --git a/src/ico_window_mgr.c b/src/ico_window_mgr.c index ef8161d..1474ba7 100644 --- a/src/ico_window_mgr.c +++ b/src/ico_window_mgr.c @@ -153,7 +153,7 @@ static void win_mgr_register_surface(uint32_t id_surface, struct weston_surface /* surface destroy */ static void win_mgr_destroy_surface(struct weston_surface *surface); /* weston_surface destroy listener */ -static void win_mgr_surface_destroy(struct wl_listener *listener, void *data); +static void win_mgr_surf_destroylistener(struct wl_listener *listener, void *data); /* read surface pixel */ static int win_mgr_takeSurfaceScreenshot(const char *filename, struct uifw_win_surface *usurf, @@ -1219,20 +1219,20 @@ static void ico_ivi_surfaceRemoveNotification(struct weston_layout_surface *ivisurf, void *userdata) { uint32_t id_surface; - struct weston_view *ev; struct weston_surface *es; + struct uifw_win_surface *usurf; id_surface = weston_layout_getIdOfSurface(ivisurf); uifw_trace("ico_ivi_surfaceRemoveNotification: Remove %x", id_surface); - ev = weston_layout_get_weston_view(ivisurf); - if (! ev) { - uifw_error("ico_ivi_surfaceRemoveNotification: weston_layout_get_weston_view Error"); + usurf = ico_window_mgr_get_usurf(id_surface); + if (! usurf) { + uifw_trace("ico_ivi_surfaceRemoveNotification: surface %08x dose not exist", id_surface); } else { - es = ev->surface; + es = usurf->surface; if (! es) { - uifw_error("ico_ivi_surfaceRemoveNotification: no weston_surface"); + uifw_trace("ico_ivi_surfaceRemoveNotification: no weston_surface"); } else { win_mgr_destroy_surface(es); @@ -1469,7 +1469,7 @@ win_mgr_register_surface(uint32_t id_surface, struct weston_surface *surface, usurf->configure_height = usurf->client_height; } wl_list_init(&usurf->surface_destroy_listener.link); - usurf->surface_destroy_listener.notify = win_mgr_surface_destroy; + usurf->surface_destroy_listener.notify = win_mgr_surf_destroylistener; wl_signal_add(&surface->destroy_signal, &usurf->surface_destroy_listener); wl_list_init(&usurf->client_link); @@ -2423,7 +2423,7 @@ win_mgr_destroy_surface(struct weston_surface *surface) /*--------------------------------------------------------------------------*/ /** - * @brief win_mgr_surface_destroy: weston_surface destroy listener + * @brief win_mgr_surf_destroylistener: weston_surface destroy listener * * @param[in] listener listener * @param[in] data data (unused) @@ -2431,16 +2431,18 @@ win_mgr_destroy_surface(struct weston_surface *surface) */ /*--------------------------------------------------------------------------*/ static void -win_mgr_surface_destroy(struct wl_listener *listener, void *data) +win_mgr_surf_destroylistener(struct wl_listener *listener, void *data) { struct uifw_win_surface *usurf = container_of(listener, struct uifw_win_surface, surface_destroy_listener); - uifw_trace("win_mgr_surface_destroy: Enter(%08x)", usurf->surfaceid); - - win_mgr_destroy_surface(usurf->surface); - - uifw_trace("win_mgr_surface_destroy: Leave"); + if (usurf && usurf->surface && usurf->ivisurf) { + uifw_trace("win_mgr_surf_destroylistener: Enter(%08x)", usurf->surfaceid); + if (weston_layout_surfaceRemove(usurf->ivisurf) != 0) { + uifw_trace("win_mgr_surf_destroylistener: weston_layout_surfaceRemove() Error"); + } + uifw_trace("win_mgr_surf_destroylistener: Leave"); + } } /*--------------------------------------------------------------------------*/ |