From 94664019ad09ec59c8173886f07bb16a04bbb330 Mon Sep 17 00:00:00 2001 From: Hyunil Date: Tue, 24 Jan 2017 15:41:40 +0900 Subject: [0.0.11] Imporve visible function to fix improper surface set Change-Id: I5b6cd1516359315482ae6de980b2b1e6678c1b20 Signed-off-by: Hyunil --- packaging/libmm-evas-renderer.spec | 2 +- src/mm_evas_renderer.c | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/packaging/libmm-evas-renderer.spec b/packaging/libmm-evas-renderer.spec index 8ca5879..703162a 100644 --- a/packaging/libmm-evas-renderer.spec +++ b/packaging/libmm-evas-renderer.spec @@ -1,6 +1,6 @@ Name: libmm-evas-renderer Summary: Multimedia Framework Evas Renderer Library -Version: 0.0.10 +Version: 0.0.11 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 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; -- cgit v1.2.3