Lower the frequency of drawing map view accepted/tizen/5.0/unified/20181102.013957 accepted/tizen/unified/20180625.141501 submit/tizen/20180611.042654 submit/tizen/20180611.112917 submit/tizen/20180621.094520 submit/tizen_5.0/20181101.000002
authorSeechan, Kim <cbible.kim@samsung.com>
Mon, 11 Jun 2018 02:52:07 +0000 (11:52 +0900)
committerSeechan, Kim <cbible.kim@samsung.com>
Mon, 11 Jun 2018 02:52:07 +0000 (11:52 +0900)
Change-Id: Ib75c3a88757d4cf6e8bbaf7022d99bbe5b2751fd

capi-maps-service.changes
packaging/capi-maps-service.spec
src/api/maps_view.cpp
src/view/gesture_detector_statemachine.cpp

index da85e73..e2c8ffd 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   capi-maps-service_0.6.20
+[Date]      11 June 2018
+[Title]     Lower the frequency of drawing map view
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   capi-maps-service_0.6.19
 [Date]      20 Mar 2018
 [Title]     Fix SVACE & Coverity issues
index 75ced93..59f5aad 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-maps-service
 Summary:    Tizen Maps Service API
-Version:    0.6.19
+Version:    0.6.20
 Release:    1
 Group:      Location/API
 License:    Apache-2.0
index fac2ccc..0e4c148 100644 (file)
@@ -380,6 +380,11 @@ void _maps_view_halt_inertial_camera(maps_view_h view)
 
 static Eina_Bool __maps_view_on_idle_cb(void *data)
 {
+       return ECORE_CALLBACK_RENEW; // same as EINA_TRUE
+}
+
+static Eina_Bool __maps_view_animator_cb(void *data)
+{
        if (!data)
                return ECORE_CALLBACK_RENEW;
 
@@ -392,23 +397,23 @@ static Eina_Bool __maps_view_on_idle_cb(void *data)
        if (ig && ig->is_transiting()) {
                is_transiting |= true;
                is_continue |= ig->next_transition_step();
-               g_usleep(5*1000);
        }
 
        view::inertial_camera *ic = v->inertial_camera;
        if (ic && ic->is_transiting()) {
                is_transiting |= true;
                is_continue |= ic->next_transition_step();
+
+               /* Request to render map with updated position */
                __maps_plugin_render_map(v,
                                         ic->get_cur_center(),
                                         ic->get_cur_zoom_factor(),
                                         ic->get_cur_rotation_angle());
                _maps_coordinates_copy(ic->get_cur_center(), v->center);
-
                _maps_view_on_overlay_update_all(v);
-               g_usleep(10*1000);
        }
 
+       /* Send READY event if finished moving map view */
        if (is_transiting && !is_continue) {
                maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_READY);
                if (ed) {
@@ -417,11 +422,6 @@ static Eina_Bool __maps_view_on_idle_cb(void *data)
                }
        }
 
-       return ECORE_CALLBACK_RENEW; // same as EINA_TRUE
-}
-
-static Eina_Bool __maps_view_animator_cb(void *data)
-{
        return ECORE_CALLBACK_RENEW;
 }
 //LCOV_EXCL_STOP
index c580bca..74fe7f9 100644 (file)
@@ -148,6 +148,8 @@ void view::gesture_detector_statemachine::move(int finger_no,
 
        switch(finger_no) {
        case 0: /* Moving the first (single) finger */
+               if (get_trajectory_effective_length(_info._prev_finger_down[0], tp) <= 2) break;
+
                _info._prev_finger_down[0] = _info._finger_move[0];
                _info._finger_move[0] = tp;
 
@@ -156,6 +158,8 @@ void view::gesture_detector_statemachine::move(int finger_no,
                break;
 
        case 1: /* Moving the second finger */
+               if (get_trajectory_effective_length(_info._prev_finger_down[1], tp) <= 2) break;
+
                _info._prev_finger_down[1] = _info._finger_move[1];
                _info._finger_move[1] = tp;