From: NAMJEONGYOON Date: Mon, 14 Nov 2016 05:17:52 +0000 (+0900) Subject: remove VISIBLE_NONE option. it should be considered in API X-Git-Tag: accepted/tizen/common/20161115.200556^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=840a68c5ab3f32b55a9ad81056ed67b009e4b571;p=platform%2Fcore%2Fmultimedia%2Flibmm-evas-renderer.git remove VISIBLE_NONE option. it should be considered in API Change-Id: I2043c323eefcf1eec12973b6f16b1ece9f957e4d --- diff --git a/src/include/mm_evas_renderer.h b/src/include/mm_evas_renderer.h index b388881..7e2df0f 100644 --- a/src/include/mm_evas_renderer.h +++ b/src/include/mm_evas_renderer.h @@ -63,12 +63,6 @@ typedef enum { UPDATE_TBM_SURF } update_info; -typedef enum { - VISIBLE_NONE, /* if user dont set visibility, it will be changed to true */ - VISIBLE_TRUE, - VISIBLE_FALSE -} visible_info; - typedef struct { media_packet_h packet; tbm_surface_h tbm_surf; @@ -101,7 +95,7 @@ typedef struct { /* properties */ gboolean update_needed; /* to update geometry information on pause state */ - visible_info visible; + gboolean visible; rect_info eo_size; rect_info dst_roi; gboolean use_ratio; diff --git a/src/mm_evas_renderer.c b/src/mm_evas_renderer.c index 0a6f2ac..e8911b1 100755 --- a/src/mm_evas_renderer.c +++ b/src/mm_evas_renderer.c @@ -220,7 +220,7 @@ static void _evas_pipe_cb(void *data, void *buffer, update_info info) LOGD("evas_info : %p, evas_info->eo : %p", evas_info, evas_info->eo); if (info == UPDATE_VISIBILITY) { - if (evas_info->visible == VISIBLE_FALSE) { + if (!evas_info->visible) { evas_object_hide(evas_info->eo); LOGI("object hide.."); } else { @@ -529,7 +529,7 @@ static int _flush_packets(mm_evas_info *evas_info) /* update the screen only if visible is true */ /* if flush buffer is null, we cant keep screen */ - if (evas_info->keep_screen && (evas_info->visible != VISIBLE_FALSE) && evas_info->flush_buffer) { + if (evas_info->keep_screen && evas_info->visible && evas_info->flush_buffer) { Evas_Native_Surface surf = { 0 }; rect_info result = { 0 }; evas_object_geometry_get(evas_info->eo, &evas_info->eo_size.x, &evas_info->eo_size.y, &evas_info->eo_size.w, &evas_info->eo_size.h); @@ -1301,10 +1301,7 @@ int mm_evas_renderer_set_visible(MMHandleType handle, bool visible) return MM_ERROR_EVASRENDER_NOT_INITIALIZED; } - if (visible) - evas_info->visible = VISIBLE_TRUE; - else - evas_info->visible = VISIBLE_FALSE; + evas_info->visible = visible; if (evas_info->epipe) { ret = ecore_pipe_write(evas_info->epipe, &visible, UPDATE_VISIBILITY); @@ -1334,10 +1331,7 @@ int mm_evas_renderer_get_visible(MMHandleType handle, bool *visible) return MM_ERROR_EVASRENDER_NOT_INITIALIZED; } - if (evas_info->visible == VISIBLE_FALSE) - *visible = FALSE; - else - *visible = TRUE; + *visible = evas_info->visible; MMER_FLEAVE();