From: Jeongmo Yang Date: Wed, 1 Jul 2020 02:11:02 +0000 (+0900) Subject: Support mm_display_get_window_rect() for OVERLAY_EXT type X-Git-Tag: submit/tizen/20200701.065351^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F237486%2F2;p=platform%2Fcore%2Fmultimedia%2Flibmm-display.git Support mm_display_get_window_rect() for OVERLAY_EXT type [Version] 0.0.7 [Profile] Common [Issue Type] Update Change-Id: Iad883b572c3715882fb680a80e8c0afa9a5134bc Signed-off-by: Jeongmo Yang --- diff --git a/packaging/libmm-display.spec b/packaging/libmm-display.spec index 9bf9a7c..f5e1d67 100644 --- a/packaging/libmm-display.spec +++ b/packaging/libmm-display.spec @@ -1,6 +1,6 @@ Name: libmm-display Summary: Multimedia framework display library -Version: 0.0.6 +Version: 0.0.7 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_display.c b/src/mm_display.c index bf38db5..7aa68c5 100644 --- a/src/mm_display.c +++ b/src/mm_display.c @@ -311,7 +311,7 @@ int mm_display_set_display(mm_display_h handle, mm_display_type_e type, void *di /* create evas renderer */ ret = mm_evas_renderer_create(&new_evas_renderer, (Evas_Object *)display); if (ret != MM_ERROR_NONE) { - LOGE("failed to creat evas renderer 0x%x", ret); + LOGE("failed to create evas renderer 0x%x", ret); ret = MM_ERROR_UNKNOWN; } else { /* release previous resources */ @@ -359,7 +359,8 @@ int mm_display_get_window_rect(mm_display_h handle, MMRectType *window_rect) return MM_ERROR_INVALID_ARGUMENT; } - if (dp_handle->type != MM_DISPLAY_TYPE_OVERLAY) { + if (dp_handle->type != MM_DISPLAY_TYPE_OVERLAY && + dp_handle->type != MM_DISPLAY_TYPE_OVERLAY_EXT) { LOGE("not overlay type : %d", dp_handle->type); return MM_ERROR_COMMON_INTERNAL; } @@ -367,6 +368,14 @@ int mm_display_get_window_rect(mm_display_h handle, MMRectType *window_rect) LOGD("get window rect for parent id : %d, display %p", dp_handle->parent_id, dp_handle->display); + /* MM_DISPLAY_TYPE_OVERLAY_EXT - display handle is Ecore_Wl2_Window. */ + if (dp_handle->type == MM_DISPLAY_TYPE_OVERLAY_EXT) { + ecore_wl2_window_geometry_get((Ecore_Wl2_Window *)dp_handle->display, + &window_rect->x, &window_rect->y, &window_rect->width, &window_rect->height); + return MM_ERROR_NONE; + } + + /* MM_DISPLAY_TYPE_OVERLAY - display handle is Evas_Object. */ evas_object_geometry_get((Evas_Object *)dp_handle->display, &window_rect->x, &window_rect->y, &window_rect->width, &window_rect->height); @@ -386,10 +395,6 @@ int mm_display_get_window_rect(mm_display_h handle, MMRectType *window_rect) LOGW("failed to get ecore_evas.. skip rotation check"); } - LOGD("window rect : %d,%d,%dx%d", - window_rect->x, window_rect->y, - window_rect->width, window_rect->height); - return MM_ERROR_NONE; }