diff options
author | Ryota Okubi <ryota.okubi@mail.toyota-td.jp> | 2014-10-03 14:41:11 +0900 |
---|---|---|
committer | Mikko Ylinen <mikko.ylinen@intel.com> | 2014-10-06 03:59:18 -0700 |
commit | 40f84b72797e694bc06f25992259f4822745ad99 (patch) | |
tree | ce630f86577cf7edb589c14d273cad8061b0baef | |
parent | 9447cd666bbd8e6f3933c194ccc09f2768378a86 (diff) | |
download | ico-uxf-weston-plugin-40f84b72797e694bc06f25992259f4822745ad99.tar.gz ico-uxf-weston-plugin-40f84b72797e694bc06f25992259f4822745ad99.tar.bz2 ico-uxf-weston-plugin-40f84b72797e694bc06f25992259f4822745ad99.zip |
A live thumbnail sometimes is not updated.
In ico-uxf-weston-plugin(weston plugin), when Weston will finish
a certain processing and will be in an idle state, it investigated
whether the buffer number of surface changed, and if it is changing,
it will have judged with drawing having changed.
A buffer number changes because an application calls SwapBuffer.
However, since Weston may process at once 2 times of SwapBuffers which
the application called continuously and a buffer number returns by
SwapBuffer in that case, drawing judges that it is not changing and
does not remake a live thumbnail.
Even if the buffer number of repair was the same, when having passed
beyond the definite period of time, it corresponded by remaking a live
thumbnail.
Change-Id: Id241741344a4b8e7736dc5efad06c5ece1d78810
Signed-off-by: Ryota Okubi <ryota.okubi@mail.toyota-td.jp>
-rw-r--r-- | src/ico_window_mgr.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/ico_window_mgr.c b/src/ico_window_mgr.c index ba42be8..d9261de 100644 --- a/src/ico_window_mgr.c +++ b/src/ico_window_mgr.c @@ -102,6 +102,9 @@ struct uifw_gl_surface_state { /* struct gl_surface_state */ /* show/hide animation with position */ #define ICO_WINDOW_MGR_ANIMATION_POS 0x10000000 +/* Waiting time for updating of livethumbnail(ms) */ +#define ICO_WINDOW_MGR_THUMBNAIL_WAITTIME 1000 + /* Multi Windiw Manager */ struct ico_win_mgr { struct weston_compositor *compositor; /* Weston compositor */ @@ -1392,7 +1395,7 @@ ico_ivi_surfacePropertyNotification(struct ivi_layout_surface *ivisurf, send_event ++; send_visible = 0; usurf->visible = 0; - if ((usurf->animation.show_anima != ICO_WINDOW_MGR_ANIMATION_NONE) && + if ((usurf->animation.hide_anima != ICO_WINDOW_MGR_ANIMATION_NONE) && (win_mgr_hook_animation != NULL)) { /* hide with animation */ retanima = @@ -1715,8 +1718,6 @@ win_mgr_check_mapsurface(struct weston_animation *animation, #endif if ((sm->interval >= 0) || (sm->eventque == 0)) { win_mgr_change_mapsurface(sm, 0, curtime); - } - if ((sm->interval >= 0) && (sm->eventque != 0)) { if (sm->interval < wait) { wait = sm->interval; } @@ -1726,9 +1727,10 @@ win_mgr_check_mapsurface(struct weston_animation *animation, /* check frame interval */ if (wait < 2000) { wait = wait / 2; + if (wait < 33) wait = 33; /* mimimum 33ms (30fsp) */ } else { - wait = 1000; + wait = ICO_WINDOW_MGR_THUMBNAIL_WAITTIME; /* maximum 1000ms */ } wl_event_source_timer_update(_ico_win_mgr->wait_mapevent, wait); } @@ -1850,17 +1852,21 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti #endif /*PERFORMANCE_EVALUATIONS*/ } else { - if (es->buffer_ref.buffer->legacy_buffer != sm->curbuf) { + dtime = (int)((curtime - sm->lasttime) & 0x7fffffff); + if ((es->buffer_ref.buffer->legacy_buffer != sm->curbuf) || + ((sm->interval >= 0) && + (dtime >= ICO_WINDOW_MGR_THUMBNAIL_WAITTIME))) { #if PERFORMANCE_EVALUATIONS > 0 - uifw_perf("SWAP_BUFFER appid=%s surface=%08x CONTENTS", - sm->usurf->uclient->appid, sm->usurf->surfaceid); + if (es->buffer_ref.buffer->legacy_buffer != sm->curbuf) { + uifw_perf("SWAP_BUFFER appid=%s surface=%08x CONTENTS", + sm->usurf->uclient->appid, sm->usurf->surfaceid); + } #endif /*PERFORMANCE_EVALUATIONS*/ if (sm->interval < 0) { sm->eventque = 1; event = 0; } else if (sm->interval > 0) { - dtime = (int)(curtime - sm->lasttime); if (dtime < sm->interval) { sm->eventque = 1; event = 0; @@ -1872,7 +1878,6 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti event = 0; } else if (sm->interval > 0) { - dtime = (int)(curtime - sm->lasttime); if (dtime < sm->interval) { event = 0; } @@ -1890,8 +1895,11 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti sm->curbuf = es->buffer_ref.buffer->legacy_buffer; } else { + dtime = (int)((curtime - sm->lasttime) & 0x7fffffff); if ((sm->eventque != 0) || - (es->buffer_ref.buffer == NULL) || (es->buffer_ref.buffer != sm->curbuf)) { + (es->buffer_ref.buffer == NULL) || (es->buffer_ref.buffer != sm->curbuf) || + ((sm->interval >= 0) && + (dtime >= ICO_WINDOW_MGR_THUMBNAIL_WAITTIME))) { sm->curbuf = es->buffer_ref.buffer; if (es->buffer_ref.buffer != NULL) { width = es->buffer_ref.buffer->width; @@ -1930,7 +1938,6 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti event = 0; } else if (sm->interval > 0) { - dtime = (int)(curtime - sm->lasttime); if (dtime < sm->interval) { sm->eventque = 1; event = 0; |