remove VISIBLE_NONE option. it should be considered in API 90/97390/1 accepted/tizen/common/20161115.200556 accepted/tizen/ivi/20161115.234300 accepted/tizen/mobile/20161115.233959 accepted/tizen/tv/20161115.234218 accepted/tizen/wearable/20161115.234225 submit/tizen/20161115.062308
authorNAMJEONGYOON <just.nam@samsung.com>
Mon, 14 Nov 2016 05:17:52 +0000 (14:17 +0900)
committerNAMJEONGYOON <just.nam@samsung.com>
Mon, 14 Nov 2016 05:21:20 +0000 (14:21 +0900)
Change-Id: I2043c323eefcf1eec12973b6f16b1ece9f957e4d

src/include/mm_evas_renderer.h
src/mm_evas_renderer.c

index b388881..7e2df0f 100644 (file)
@@ -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;
index 0a6f2ac..e8911b1 100755 (executable)
@@ -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();