diff options
author | Hyunil <hyunil46.park@samsung.com> | 2017-01-24 15:41:40 +0900 |
---|---|---|
committer | Hyunil Park <hyunil46.park@samsung.com> | 2017-01-24 02:24:05 -0800 |
commit | f0f7292d18a6c2223bf165e73306b15156556a59 (patch) | |
tree | f2ad1fe814db006c0d84c4d6003cc4601c9fdfb5 /src/mm_evas_renderer.c | |
parent | 62c99338a9d1d74e6278b9e42cd4d7fccbfc176b (diff) | |
download | libmm-evas-renderer-f0f7292d18a6c2223bf165e73306b15156556a59.tar.gz libmm-evas-renderer-f0f7292d18a6c2223bf165e73306b15156556a59.tar.bz2 libmm-evas-renderer-f0f7292d18a6c2223bf165e73306b15156556a59.zip |
[0.0.11] Imporve visible function to fix improper surface setsubmit/tizen_3.0/20170202.113256accepted/tizen/3.0/wearable/20170203.090031accepted/tizen/3.0/tv/20170203.090011accepted/tizen/3.0/mobile/20170203.085948accepted/tizen/3.0/ivi/20170203.090050accepted/tizen/3.0/common/20170203.151015tizen_3.0_tv
Change-Id: I5b6cd1516359315482ae6de980b2b1e6678c1b20
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
(cherry picked from commit 94664019ad09ec59c8173886f07bb16a04bbb330)
Diffstat (limited to 'src/mm_evas_renderer.c')
-rwxr-xr-x | src/mm_evas_renderer.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/mm_evas_renderer.c b/src/mm_evas_renderer.c index 6b1e9e5..3f4621c 100755 --- a/src/mm_evas_renderer.c +++ b/src/mm_evas_renderer.c @@ -219,26 +219,26 @@ static void _evas_pipe_cb(void *data, void *buffer, update_info info) return; } - LOGD("evas_info : %p, evas_info->eo : %p", evas_info, evas_info->eo); + LOGD("evas_info : %p, type : %d, evas_info->eo : %p", evas_info, info, evas_info->eo); + + if (info != UPDATE_TBM_SURF && info != UPDATE_VISIBILITY) { + LOGW("invalid info type : %d", info); + g_mutex_unlock(&evas_info->mp_lock); + return; + } - /* FIXME: fix visible logic to skip to render buffer instead of calling evas_object_hide/show directly */ if (info == UPDATE_VISIBILITY) { if (!evas_info->visible) { + evas_object_image_native_surface_set(evas_info->eo, NULL); evas_object_hide(evas_info->eo); LOGI("object hide.."); + LOGD("[LEAVE]"); + g_mutex_unlock(&evas_info->mp_lock); + return; } else { evas_object_show(evas_info->eo); LOGI("object show.. %d", evas_info->visible); } - LOGD("[LEAVE]"); - g_mutex_unlock(&evas_info->mp_lock); - return; - } - - if (info != UPDATE_TBM_SURF) { - LOGW("invalid info type : %d", info); - g_mutex_unlock(&evas_info->mp_lock); - return; } if ((evas_info->cur_idx == -1) || !evas_info->pkt_info[evas_info->cur_idx].tbm_surf) { @@ -314,8 +314,12 @@ static void _evas_pipe_cb(void *data, void *buffer, update_info info) else g_cnt_out++; #endif - evas_object_image_native_surface_set(evas_info->eo, &surf); - LOGD("native surface set finish"); + if (evas_info->visible) { + evas_object_image_native_surface_set(evas_info->eo, &surf); + LOGD("native surface set finish"); + } else { + LOGD("skip... surface set"); + } if (result.x || result.y) LOGD("coordinate x, y (%d, %d) for locating video to center", result.x, result.y); @@ -746,8 +750,6 @@ static int _mm_evas_renderer_set_info(mm_evas_info *evas_info, Evas_Object *eo) evas_info->pkt_info[i].tbm_surf = NULL; evas_info->pkt_info[i].prev = -1; } - /* FIXME: forcedly make hide evas object, because default value of visible is false */ - evas_object_hide(evas_info->eo); evas_info->cur_idx = -1; evas_info->dst_roi.x = evas_info->dst_roi.y = evas_info->dst_roi.w = evas_info->dst_roi.h = 0; |