summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-11-14 09:26:04 +0000
committerChris Michael <cp.michael@samsung.com>2013-11-14 11:02:43 +0000
commite32546a545b8e184efbfc18b77ec0bb41cf93b9d (patch)
treee81f96f117cc73f7fa57d811c04d1e556a17d4bb /src
parent773320213f4d4636fa3f1a15476df468eeca15a4 (diff)
Stop fetching the same Evas and Clip object 4 times
We can just fetch this information once as it is not going to change during the for loop. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_flip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index fc941fbb4..4997d89cc 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -2044,6 +2044,10 @@ _interaction_set(Eo *obj, void *_pd, va_list *list)
2044 2044
2045 if (sd->intmode == mode) return; 2045 if (sd->intmode == mode) return;
2046 sd->intmode = mode; 2046 sd->intmode = mode;
2047
2048 Evas *e = evas_object_evas_get(obj);
2049 Evas_Object *clip = evas_object_clip_get(obj);
2050
2047 for (i = 0; i < 4; i++) 2051 for (i = 0; i < 4; i++)
2048 { 2052 {
2049 if (sd->intmode == ELM_FLIP_INTERACTION_NONE) 2053 if (sd->intmode == ELM_FLIP_INTERACTION_NONE)
@@ -2058,11 +2062,10 @@ _interaction_set(Eo *obj, void *_pd, va_list *list)
2058 { 2062 {
2059 if ((sd->dir_enabled[i]) && (!sd->event[i])) 2063 if ((sd->dir_enabled[i]) && (!sd->event[i]))
2060 { 2064 {
2061 Evas *e = evas_object_evas_get(obj);
2062 sd->event[i] = evas_object_rectangle_add(e); 2065 sd->event[i] = evas_object_rectangle_add(e);
2063 2066
2064 evas_object_data_set(sd->event[i], "_elm_leaveme", obj); 2067 evas_object_data_set(sd->event[i], "_elm_leaveme", obj);
2065 evas_object_clip_set(sd->event[i], evas_object_clip_get(obj)); 2068 evas_object_clip_set(sd->event[i], clip);
2066 evas_object_color_set(sd->event[i], 0, 0, 0, 0); 2069 evas_object_color_set(sd->event[i], 0, 0, 0, 0);
2067 evas_object_show(sd->event[i]); 2070 evas_object_show(sd->event[i]);
2068 evas_object_smart_member_add(sd->event[i], obj); 2071 evas_object_smart_member_add(sd->event[i], obj);