summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanos Kovacs <jankovac503@gmail.com>2014-10-08 07:01:16 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2014-10-08 07:01:16 -0700
commit8ccf810f079b757e6be43f4c0ec2107351776b13 (patch)
treea81b5aadb54e2bcc8dc632fb9b6f8ccddcd32700
parenta4837bd50f26e69adfc85ae0c18799154c3f58bc (diff)
parent40f84b72797e694bc06f25992259f4822745ad99 (diff)
downloadico-uxf-weston-plugin-8ccf810f079b757e6be43f4c0ec2107351776b13.tar.gz
ico-uxf-weston-plugin-8ccf810f079b757e6be43f4c0ec2107351776b13.tar.bz2
ico-uxf-weston-plugin-8ccf810f079b757e6be43f4c0ec2107351776b13.zip
-rw-r--r--src/ico_window_mgr.c29
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;