aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-07-29 17:28:27 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-08-01 10:29:24 +0900
commitb3293408a4a02ad08727d4ac134795caaf4ef6ca (patch)
treebe6f9082c3ae397230905d66b95af5fa3505beef
parentCanvas text: fix range geometry calculation for RTL (diff)
downloadefl-b3293408a4a02ad08727d4ac134795caaf4ef6ca.tar.gz
scrollable: Avoid useless connect to animator
If scrolling Y no need to register X animators. And vice versa. It's a minor optimization.
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 32c2b3d97f..a92a503ed4 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -2356,6 +2356,7 @@ _elm_scroll_scroll_to_y(Elm_Scrollable_Smart_Interface_Data *sid,
}
t = ecore_loop_time_get();
elm_obj_pan_pos_get(sid->pan_obj, &px, &py);
+ if (py == pos_y) return;
sid->scrollto.y.start = py;
sid->scrollto.y.end = pos_y;
sid->scrollto.y.t_start = t;
@@ -2399,6 +2400,7 @@ _elm_scroll_scroll_to_x(Elm_Scrollable_Smart_Interface_Data *sid,
}
t = ecore_loop_time_get();
elm_obj_pan_pos_get(sid->pan_obj, &px, &py);
+ if (px == pos_x) return;
sid->scrollto.x.start = px;
sid->scrollto.x.end = pos_x;
sid->scrollto.x.t_start = t;