Do not call unnecessary function 21/242921/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.122219 accepted/tizen/6.0/unified/hotfix/20201103.004541 accepted/tizen/6.0/unified/hotfix/20201103.051709 accepted/tizen/unified/20200903.151803 submit/tizen/20200902.092653 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_6.0.m2_release
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 2 Sep 2020 03:07:46 +0000 (12:07 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 2 Sep 2020 03:08:55 +0000 (12:08 +0900)
- Skip camera_attr_get_display_roi_area() if display mode is not CAMERA_DISPLAY_MODE_CUSTOM_ROI in _camera_set_display().

[Version] 0.4.39
[Issue Type] Optimization

Change-Id: I97ad53a69a54ea14ce286df4d99e785d56055661
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-camera.spec
src/camera.c

index 4bbb8d2..3baeb57 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.4.38
+Version:    0.4.39
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 9baa0c0..ae8991f 100644 (file)
@@ -3196,18 +3196,20 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
                        camera_get_display_mode(camera, &mode);
                        camera_get_display_rotation(camera, &rotation);
                        camera_is_display_visible(camera, &visible);
-                       camera_attr_get_display_roi_area(camera, &x, &y, &width, &height);
 
-                       LOGD("current setting : flip %d, mode %d, rotation %d, visible %d, roi %d,%d,%dx%d",
-                               flip, mode, rotation, visible, x, y, width, height);
+                       LOGD("current setting : flip %d, mode %d, rotation %d, visible %d",
+                               flip, mode, rotation, visible);
 
                        mm_ret = mm_display_interface_evas_set_flip(cb_info->dp_interface, flip);
                        mm_ret |= mm_display_interface_evas_set_mode(cb_info->dp_interface, mode);
                        mm_ret |= mm_display_interface_evas_set_rotation(cb_info->dp_interface, rotation);
                        mm_ret |= mm_display_interface_evas_set_visible(cb_info->dp_interface, visible);
 
-                       if (mode == CAMERA_DISPLAY_MODE_CUSTOM_ROI)
+                       if (mode == CAMERA_DISPLAY_MODE_CUSTOM_ROI) {
+                               camera_attr_get_display_roi_area(camera, &x, &y, &width, &height);
+                               LOGD("current setting : roi %d,%d,%dx%d", x, y, width, height);
                                mm_ret |= mm_display_interface_evas_set_roi_area(cb_info->dp_interface, x, y, width, height);
+                       }
 //LCOV_EXCL_STOP
                }
        }