summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>2014-03-06 15:49:53 +0900
committerMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>2014-03-06 15:49:53 +0900
commitf5ff0b8cc9b086493eb59b14ec1609b9c0015f74 (patch)
treea796c8deef3e48029d6f95a90dde82cf64d40a28
parent88c8408297106c5020084e5f0c9ba3dbca48afc4 (diff)
downloadico-uxf-weston-plugin-f5ff0b8cc9b086493eb59b14ec1609b9c0015f74.tar.gz
ico-uxf-weston-plugin-f5ff0b8cc9b086493eb59b14ec1609b9c0015f74.tar.bz2
ico-uxf-weston-plugin-f5ff0b8cc9b086493eb59b14ec1609b9c0015f74.zip
bug fix: A setup to surface for "no animation" does not function normally.
Change-Id: I86a0b57f5726150d0bdd3bd849ea3f13bed8a747 Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
-rw-r--r--src/ico_plugin_version.h2
-rw-r--r--src/ico_window_animation.c28
-rw-r--r--src/ico_window_mgr.c18
-rw-r--r--src/ico_window_mgr_private.h1
4 files changed, 35 insertions, 14 deletions
diff --git a/src/ico_plugin_version.h b/src/ico_plugin_version.h
index 381cb64..72246d1 100644
--- a/src/ico_plugin_version.h
+++ b/src/ico_plugin_version.h
@@ -1 +1 @@
-#define ICO_PLUIGN_VERSION "0.9.21 (Feb-28-2014)"
+#define ICO_PLUIGN_VERSION "0.9.21 (Mar-06-2014)"
diff --git a/src/ico_window_animation.c b/src/ico_window_animation.c
index e78baab..52514f6 100644
--- a/src/ico_window_animation.c
+++ b/src/ico_window_animation.c
@@ -453,6 +453,8 @@ animation_end(struct uifw_win_surface *usurf, const int disp)
}
if (disp) {
usurf->restrain_configure = 0;
+ uifw_trace("animation_end: %08x vis=%d(%x)",
+ usurf->surfaceid, usurf->visible, usurf->animation.visible);
if ((usurf->animation.visible == ANIMA_HIDE_AT_END) &&
(usurf->visible != 0)) {
usurf->visible = 0;
@@ -887,8 +889,9 @@ animation_swing_end(struct weston_animation *animation)
if (usurf && usurf->surface) {
es = usurf->surface;
ev = ico_ivi_get_primary_view(usurf);
- ev->alpha = 1.0;
-
+ ev->alpha = usurf->animation.alpha;
+ uifw_debug("animation_swing_end: %08x set alpha=%f",
+ usurf->surfaceid, usurf->animation.alpha);
if ((ev->output) && (es->buffer_ref.buffer)) {
weston_surface_damage(es);
}
@@ -973,13 +976,14 @@ animation_fade(struct weston_animation *animation,
ev->alpha = 1.0f - (((float)(par*2)) / 100.0f);
}
}
- if (ev->alpha < 0.0) ev->alpha = 0.0;
- else if (ev->alpha > 1.0) ev->alpha = 1.0;
-
- 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->alpha < 0.0f) ev->alpha = 0.0f;
+ else if (ev->alpha > 1.0f) ev->alpha = 1.0f;
+ if ((par < 5) || (par > 95)) {
+ 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);
@@ -1014,8 +1018,9 @@ animation_fade_end(struct weston_animation *animation)
if (usurf && usurf->surface) {
es = usurf->surface;
ev = ico_ivi_get_primary_view(usurf);
- ev->alpha = 1.0;
-
+ ev->alpha = usurf->animation.alpha;
+ uifw_debug("animation_fade_end: %08x set alpha=%f",
+ usurf->surfaceid, usurf->animation.alpha);
if ((ev->output) && (es->buffer_ref.buffer) &&
(es->width > 0) && (es->height > 0)) {
weston_surface_damage(es);
@@ -1161,8 +1166,7 @@ animation_zoom_end(struct weston_animation *animation)
if (usurf && usurf->surface) {
es = usurf->surface;
ev = ico_ivi_get_primary_view(usurf);
- ev->alpha = 1.0;
-
+ 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 89e718c..36d4ac2 100644
--- a/src/ico_window_mgr.c
+++ b/src/ico_window_mgr.c
@@ -54,6 +54,7 @@
#include <GLES2/gl2.h>
#include <weston/compositor.h>
+#include <weston/weston-layout.h>
/* detail debug log */
#define UIFW_DETAIL_OUT 0 /* 1=detail debug log/0=no detail log */
@@ -1267,6 +1268,7 @@ ico_ivi_surfacePropertyNotification(struct weston_layout_surface *ivisurf,
int retanima;
uint32_t newmask;
struct uifw_win_surface *usurf;
+ struct weston_view *ev;
newmask = ((uint32_t)mask) & (~(IVI_NOTIFICATION_OPACITY|IVI_NOTIFICATION_ORIENTATION|
IVI_NOTIFICATION_PIXELFORMAT));
@@ -1315,6 +1317,13 @@ ico_ivi_surfacePropertyNotification(struct weston_layout_surface *ivisurf,
usurf->animation.pos_y = usurf->y;
usurf->animation.pos_width = usurf->width;
usurf->animation.pos_height = usurf->height;
+ ev = weston_layout_get_weston_view(ivisurf);
+ if (ev) {
+ usurf->animation.alpha = ev->alpha;
+ }
+ else {
+ usurf->animation.alpha = 0.9999f;
+ }
retanima =
(*win_mgr_hook_animation)(ICO_WINDOW_MGR_ANIMATION_OPSHOW,
(void *)usurf);
@@ -1332,6 +1341,13 @@ ico_ivi_surfacePropertyNotification(struct weston_layout_surface *ivisurf,
usurf->animation.pos_y = usurf->y;
usurf->animation.pos_width = usurf->width;
usurf->animation.pos_height = usurf->height;
+ ev = weston_layout_get_weston_view(ivisurf);
+ if (ev) {
+ usurf->animation.alpha = ev->alpha;
+ }
+ else {
+ usurf->animation.alpha = 0.99999999f;
+ }
retanima =
(*win_mgr_hook_animation)(ICO_WINDOW_MGR_ANIMATION_OPHIDE,
(void *)usurf);
@@ -1494,7 +1510,7 @@ uifw_set_animation(struct wl_client *client, struct wl_resource *resource,
int animaid;
struct uifw_win_surface *usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
- uifw_trace("uifw_set_transition: surf=%08x,type=%x,anim=%s,time=%d",
+ uifw_trace("uifw_set_animation: surf=%08x,type=%x,anim=%s,time=%d",
surfaceid, type, animation, time);
if (usurf) {
diff --git a/src/ico_window_mgr_private.h b/src/ico_window_mgr_private.h
index faeeecf..70c4d2c 100644
--- a/src/ico_window_mgr_private.h
+++ b/src/ico_window_mgr_private.h
@@ -125,6 +125,7 @@ struct uifw_win_surface {
uint16_t pos_y; /* start/end Y-coordinate */
uint16_t pos_width; /* start/end width */
uint16_t pos_height; /* start/end height */
+ float alpha; /* original alpha */
short current; /* animation current percentage */
char state; /* animation state */
char visible; /* need hide(1)/show(2) at end of animation*/