From: Seechan, Kim Date: Mon, 11 Jun 2018 02:52:07 +0000 (+0900) Subject: Lower the frequency of drawing map view X-Git-Tag: submit/tizen/20180611.042654^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c655aa8a8c1cc74e7e25a21d95d1e03fd1dc7cc;p=platform%2Fcore%2Fapi%2Fmaps-service.git Lower the frequency of drawing map view Change-Id: Ib75c3a88757d4cf6e8bbaf7022d99bbe5b2751fd --- diff --git a/capi-maps-service.changes b/capi-maps-service.changes index da85e73..e2c8ffd 100644 --- a/capi-maps-service.changes +++ b/capi-maps-service.changes @@ -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 + [Version] capi-maps-service_0.6.19 [Date] 20 Mar 2018 [Title] Fix SVACE & Coverity issues diff --git a/packaging/capi-maps-service.spec b/packaging/capi-maps-service.spec index 75ced93..59f5aad 100644 --- a/packaging/capi-maps-service.spec +++ b/packaging/capi-maps-service.spec @@ -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 diff --git a/src/api/maps_view.cpp b/src/api/maps_view.cpp index fac2ccc..0e4c148 100644 --- a/src/api/maps_view.cpp +++ b/src/api/maps_view.cpp @@ -379,6 +379,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 diff --git a/src/view/gesture_detector_statemachine.cpp b/src/view/gesture_detector_statemachine.cpp index c580bca..74fe7f9 100644 --- a/src/view/gesture_detector_statemachine.cpp +++ b/src/view/gesture_detector_statemachine.cpp @@ -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;