summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2017-10-25 14:54:41 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-10-25 15:04:59 +0900
commit9d1fad8dc163684a74c31f552ba6b1b603273c49 (patch)
treec395ff63bf0d35e8c759bd6b4db9e958f8406072
parent56a4d3037e38a01903f2f35d45f86103976c0a5e (diff)
downloadefl-9d1fad8dc163684a74c31f552ba6b1b603273c49.tar.gz
efl_animation: Remove duration_only_set and total_duration_set methods
Remove unnecessary methods, duration_only_set and total_duration_set.
-rw-r--r--src/lib/evas/Evas_Internal.h3
-rw-r--r--src/lib/evas/canvas/efl_animation.c25
-rw-r--r--src/lib/evas/canvas/efl_animation.eo8
-rw-r--r--src/lib/evas/canvas/efl_animation_alpha.c3
-rw-r--r--src/lib/evas/canvas/efl_animation_group.c10
-rw-r--r--src/lib/evas/canvas/efl_animation_group_parallel.c19
-rw-r--r--src/lib/evas/canvas/efl_animation_group_sequential.c17
-rw-r--r--src/lib/evas/canvas/efl_animation_object.c33
-rw-r--r--src/lib/evas/canvas/efl_animation_object_group.c12
-rw-r--r--src/lib/evas/canvas/efl_animation_object_group_parallel.c16
-rw-r--r--src/lib/evas/canvas/efl_animation_object_group_sequential.c16
-rw-r--r--src/lib/evas/canvas/efl_animation_object_private.h1
-rw-r--r--src/lib/evas/canvas/efl_animation_private.h1
-rw-r--r--src/lib/evas/canvas/efl_animation_rotate.c3
-rw-r--r--src/lib/evas/canvas/efl_animation_scale.c3
-rw-r--r--src/lib/evas/canvas/efl_animation_translate.c3
16 files changed, 13 insertions, 160 deletions
diff --git a/src/lib/evas/Evas_Internal.h b/src/lib/evas/Evas_Internal.h
index 0ce1d847ba..f2fa838863 100644
--- a/src/lib/evas/Evas_Internal.h
+++ b/src/lib/evas/Evas_Internal.h
@@ -93,9 +93,6 @@ EOAPI Eina_Bool efl_animation_object_final_state_keep_get(const Eo *obj);
EOAPI void efl_animation_object_duration_set(Eo *obj, double duration);
EOAPI double efl_animation_object_duration_get(const Eo *obj);
-EOAPI void efl_animation_object_duration_only_set(Eo *obj, double duration);
-
-EOAPI void efl_animation_object_total_duration_set(Eo *obj, double total_duration);
EOAPI double efl_animation_object_total_duration_get(const Eo *obj);
EOAPI void efl_animation_object_start_delay_set(Eo *obj, double delay_time);
diff --git a/src/lib/evas/canvas/efl_animation.c b/src/lib/evas/canvas/efl_animation.c
index 99b8907012..c5c461e0b1 100644
--- a/src/lib/evas/canvas/efl_animation.c
+++ b/src/lib/evas/canvas/efl_animation.c
@@ -27,12 +27,10 @@ _efl_animation_target_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd)
}
EOLIAN static void
-_efl_animation_duration_set(Eo *eo_obj,
+_efl_animation_duration_set(Eo *eo_obj EINA_UNUSED,
Efl_Animation_Data *pd,
double duration)
{
- efl_animation_total_duration_set(eo_obj, duration);
-
pd->duration = duration;
}
@@ -42,27 +40,11 @@ _efl_animation_duration_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd)
return pd->duration;
}
-EOLIAN static void
-_efl_animation_duration_only_set(Eo *eo_obj EINA_UNUSED,
- Efl_Animation_Data *pd,
- double duration)
-{
- pd->duration = duration;
-}
-
-EOLIAN static void
-_efl_animation_total_duration_set(Eo *eo_obj EINA_UNUSED,
- Efl_Animation_Data *pd,
- double total_duration)
-{
- pd->total_duration = total_duration;
-}
-
EOLIAN static double
_efl_animation_total_duration_get(Eo *eo_obj EINA_UNUSED,
Efl_Animation_Data *pd)
{
- return pd->total_duration;
+ return pd->duration;
}
EOLIAN static void
@@ -97,9 +79,6 @@ _efl_animation_object_create(Eo *eo_obj, Efl_Animation_Data *pd EINA_UNUSED)
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(anim_obj, total_duration);
-
int repeat_count = efl_animation_repeat_count_get(eo_obj);
efl_animation_object_repeat_count_set(anim_obj, repeat_count);
diff --git a/src/lib/evas/canvas/efl_animation.eo b/src/lib/evas/canvas/efl_animation.eo
index 617a109f67..9b5ca30eb7 100644
--- a/src/lib/evas/canvas/efl_animation.eo
+++ b/src/lib/evas/canvas/efl_animation.eo
@@ -32,15 +32,7 @@ class Efl.Animation (Efl.Object)
duration: double; [[Duration value.]]
}
}
- duration_only_set @protected {
- [[Set duration only without setting total duration.]]
- params {
- @in duration: double; [[Duration value.]]
- }
- }
@property total_duration {
- set @protected {
- }
get {
}
values {
diff --git a/src/lib/evas/canvas/efl_animation_alpha.c b/src/lib/evas/canvas/efl_animation_alpha.c
index 8b14a37162..d077120881 100644
--- a/src/lib/evas/canvas/efl_animation_alpha.c
+++ b/src/lib/evas/canvas/efl_animation_alpha.c
@@ -38,9 +38,6 @@ _efl_animation_alpha_efl_animation_object_create(Eo *eo_obj,
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(anim_obj, total_duration);
-
double start_delay_time = efl_animation_start_delay_get(eo_obj);
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
diff --git a/src/lib/evas/canvas/efl_animation_group.c b/src/lib/evas/canvas/efl_animation_group.c
index 9f1b105c30..2e657e67f1 100644
--- a/src/lib/evas/canvas/efl_animation_group.c
+++ b/src/lib/evas/canvas/efl_animation_group.c
@@ -72,11 +72,7 @@ _efl_animation_group_efl_animation_duration_set(Eo *eo_obj,
}
end:
- efl_animation_duration_only_set(efl_super(eo_obj, MY_CLASS), duration);
-
- //efl_animation_total_duration_get() should calculate the new total duration.
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_total_duration_set(eo_obj, total_duration);
+ efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
}
EOLIAN static void
@@ -118,8 +114,8 @@ _efl_animation_group_efl_object_constructor(Eo *eo_obj,
pd->animations = NULL;
//group animation does not affect its child duration by default.
- efl_animation_duration_only_set(efl_super(eo_obj, MY_CLASS),
- EFL_ANIMATION_GROUP_DURATION_NONE);
+ efl_animation_duration_set(efl_super(eo_obj, MY_CLASS),
+ EFL_ANIMATION_GROUP_DURATION_NONE);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/efl_animation_group_parallel.c b/src/lib/evas/canvas/efl_animation_group_parallel.c
index fc98c0a02d..0e401614e8 100644
--- a/src/lib/evas/canvas/efl_animation_group_parallel.c
+++ b/src/lib/evas/canvas/efl_animation_group_parallel.c
@@ -9,14 +9,6 @@ _efl_animation_group_parallel_efl_animation_group_animation_add(Eo *eo_obj,
efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS),
animation);
-
- /* Total duration is calculated in efl_animation_total_duration_get() based
- * on the current group animation list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration =
- efl_animation_total_duration_get(eo_obj);
- efl_animation_total_duration_set(eo_obj, total_duration);
}
EOLIAN static void
@@ -28,14 +20,6 @@ _efl_animation_group_parallel_efl_animation_group_animation_del(Eo *eo_obj,
efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS),
animation);
-
- /* Total duration is calculated in efl_animation_total_duration_get() based
- * on the current group animation list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration =
- efl_animation_total_duration_get(eo_obj);
- efl_animation_total_duration_set(eo_obj, total_duration);
}
EOLIAN static double
@@ -95,9 +79,6 @@ _efl_animation_group_parallel_efl_animation_object_create(Eo *eo_obj,
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(group_anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(group_anim_obj, total_duration);
-
double start_delay_time = efl_animation_start_delay_get(eo_obj);
efl_animation_object_start_delay_set(group_anim_obj, start_delay_time);
diff --git a/src/lib/evas/canvas/efl_animation_group_sequential.c b/src/lib/evas/canvas/efl_animation_group_sequential.c
index d70974b1d8..8db4928ff4 100644
--- a/src/lib/evas/canvas/efl_animation_group_sequential.c
+++ b/src/lib/evas/canvas/efl_animation_group_sequential.c
@@ -8,13 +8,6 @@ _efl_animation_group_sequential_efl_animation_group_animation_add(Eo *eo_obj,
if (!animation) return;
efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS), animation);
-
- /* Total duration is calculated in efl_animation_total_duration_get() based
- * on the current group animation list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_total_duration_set(eo_obj, total_duration);
}
EOLIAN static void
@@ -25,13 +18,6 @@ _efl_animation_group_sequential_efl_animation_group_animation_del(Eo *eo_obj,
if (!animation) return;
efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS), animation);
-
- /* Total duration is calculated in efl_animation_total_duration_get() based
- * on the current group animation list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_total_duration_set(eo_obj, total_duration);
}
EOLIAN static double
@@ -89,9 +75,6 @@ _efl_animation_group_sequential_efl_animation_object_create(Eo *eo_obj,
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(group_anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(group_anim_obj, total_duration);
-
double start_delay_time = efl_animation_start_delay_get(eo_obj);
efl_animation_object_start_delay_set(group_anim_obj, start_delay_time);
diff --git a/src/lib/evas/canvas/efl_animation_object.c b/src/lib/evas/canvas/efl_animation_object.c
index d863289615..03c531af02 100644
--- a/src/lib/evas/canvas/efl_animation_object.c
+++ b/src/lib/evas/canvas/efl_animation_object.c
@@ -49,12 +49,10 @@ _efl_animation_object_target_get(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_animation_object_duration_set(Eo *eo_obj,
+_efl_animation_object_duration_set(Eo *eo_obj EINA_UNUSED,
Efl_Animation_Object_Data *pd,
double duration)
{
- efl_animation_object_total_duration_set(eo_obj, duration);
-
pd->duration = duration;
}
@@ -65,27 +63,11 @@ _efl_animation_object_duration_get(Eo *eo_obj EINA_UNUSED,
return pd->duration;
}
-EOLIAN static void
-_efl_animation_object_duration_only_set(Eo *eo_obj EINA_UNUSED,
- Efl_Animation_Object_Data *pd,
- double duration)
-{
- pd->duration = duration;
-}
-
-EOLIAN static void
-_efl_animation_object_total_duration_set(Eo *eo_obj EINA_UNUSED,
- Efl_Animation_Object_Data *pd,
- double total_duration)
-{
- pd->total_duration = total_duration;
-}
-
EOLIAN static double
_efl_animation_object_total_duration_get(Eo *eo_obj EINA_UNUSED,
Efl_Animation_Object_Data *pd)
{
- return pd->total_duration;
+ return pd->duration;
}
EOLIAN static void
@@ -262,7 +244,7 @@ _animator_cb(void *data)
double paused_time = pd->paused_time;
- double total_duration = pd->total_duration;
+ double total_duration = efl_animation_object_total_duration_get(eo_obj);
pd->time.current = ecore_loop_time_get();
double elapsed_time = pd->time.current - pd->time.begin;
@@ -351,7 +333,8 @@ end:
static void
_start(Eo *eo_obj, Efl_Animation_Object_Data *pd)
{
- if (pd->total_duration < 0.0) return;
+ double total_duration = efl_animation_object_total_duration_get(eo_obj);
+ if (total_duration < 0.0) return;
//Save the current state of the target
efl_animation_object_target_state_save(eo_obj);
@@ -511,7 +494,6 @@ _efl_animation_object_efl_object_constructor(Eo *eo_obj,
pd->progress = 0.0;
pd->duration = 0.0;
- pd->total_duration = 0.0;
pd->repeat_mode = EFL_ANIMATION_OBJECT_REPEAT_MODE_RESTART;
pd->repeat_count = 0;
@@ -559,9 +541,6 @@ EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_final_state_keep_get, Eina_Bool,
EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_duration_set, EFL_FUNC_CALL(duration), double duration);
EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_duration_get, double, 0);
-EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_duration_only_set, EFL_FUNC_CALL(duration), double duration);
-
-EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_total_duration_set, EFL_FUNC_CALL(total_duration), double total_duration);
EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_total_duration_get, double, 0);
EOAPI EFL_VOID_FUNC_BODYV(efl_animation_object_start_delay_set, EFL_FUNC_CALL(delay_time), double delay_time);
@@ -583,8 +562,6 @@ EOAPI EFL_FUNC_BODY_CONST(efl_animation_object_interpolator_get, Efl_Interpolato
EFL_OBJECT_OP_FUNC(efl_animation_object_final_state_keep_get, _efl_animation_object_final_state_keep_get), \
EFL_OBJECT_OP_FUNC(efl_animation_object_duration_set, _efl_animation_object_duration_set), \
EFL_OBJECT_OP_FUNC(efl_animation_object_duration_get, _efl_animation_object_duration_get), \
- EFL_OBJECT_OP_FUNC(efl_animation_object_duration_only_set, _efl_animation_object_duration_only_set), \
- EFL_OBJECT_OP_FUNC(efl_animation_object_total_duration_set, _efl_animation_object_total_duration_set), \
EFL_OBJECT_OP_FUNC(efl_animation_object_total_duration_get, _efl_animation_object_total_duration_get), \
EFL_OBJECT_OP_FUNC(efl_animation_object_start_delay_set, _efl_animation_object_start_delay_set), \
EFL_OBJECT_OP_FUNC(efl_animation_object_start_delay_get, _efl_animation_object_start_delay_get), \
diff --git a/src/lib/evas/canvas/efl_animation_object_group.c b/src/lib/evas/canvas/efl_animation_object_group.c
index 09d45141c2..b7094d76b8 100644
--- a/src/lib/evas/canvas/efl_animation_object_group.c
+++ b/src/lib/evas/canvas/efl_animation_object_group.c
@@ -74,13 +74,7 @@ _efl_animation_object_group_efl_animation_object_duration_set(Eo *eo_obj,
}
end:
- efl_animation_object_duration_only_set(efl_super(eo_obj, MY_CLASS),
- duration);
-
- /* efl_animation_object_total_duration_get() should calculate the new total
- * duration. */
- double total_duration = efl_animation_object_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(eo_obj, total_duration);
+ efl_animation_object_duration_set(efl_super(eo_obj, MY_CLASS), duration);
}
EOLIAN static void
@@ -126,8 +120,8 @@ _efl_animation_object_group_efl_object_constructor(Eo *eo_obj,
pd->anim_objs = NULL;
//group animation object does not affect its child duration by default.
- efl_animation_object_duration_only_set(efl_super(eo_obj, MY_CLASS),
- EFL_ANIMATION_OBJECT_GROUP_DURATION_NONE);
+ efl_animation_object_duration_set(efl_super(eo_obj, MY_CLASS),
+ EFL_ANIMATION_OBJECT_GROUP_DURATION_NONE);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/efl_animation_object_group_parallel.c b/src/lib/evas/canvas/efl_animation_object_group_parallel.c
index 120b1e5fde..3c9d928d7b 100644
--- a/src/lib/evas/canvas/efl_animation_object_group_parallel.c
+++ b/src/lib/evas/canvas/efl_animation_object_group_parallel.c
@@ -66,14 +66,6 @@ _efl_animation_object_group_parallel_efl_animation_object_group_object_add(Eo *e
/* Add member object data and append the data to the member object data
* list. */
_member_anim_obj_data_add(pd, anim_obj, 0);
-
- /* Total duration is calculated in
- * efl_animation_object_total_duration_get() based on the current group
- * animation object list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration = efl_animation_object_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(eo_obj, total_duration);
}
EOLIAN static void
@@ -88,14 +80,6 @@ _efl_animation_object_group_parallel_efl_animation_object_group_object_del(Eo *e
/* Delete member object data and remove the data from the member object
* data list. */
_member_anim_obj_data_del(pd, anim_obj);
-
- /* Total duration is calculated in
- * efl_animation_object_total_duration_get() based on the current group
- * animation object list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration = efl_animation_object_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(eo_obj, total_duration);
}
EOLIAN static double
diff --git a/src/lib/evas/canvas/efl_animation_object_group_sequential.c b/src/lib/evas/canvas/efl_animation_object_group_sequential.c
index d7f717885b..bc171a830d 100644
--- a/src/lib/evas/canvas/efl_animation_object_group_sequential.c
+++ b/src/lib/evas/canvas/efl_animation_object_group_sequential.c
@@ -68,14 +68,6 @@ _efl_animation_object_group_sequential_efl_animation_object_group_object_add(Eo
/* Add member object data and append the data to the member object data
* list. */
_member_anim_obj_data_add(pd, anim_obj, 0);
-
- /* Total duration is calculated in
- * efl_animation_object_total_duration_get() based on the current group
- * animation object list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration = efl_animation_object_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(eo_obj, total_duration);
}
EOLIAN static void
@@ -90,14 +82,6 @@ _efl_animation_object_group_sequential_efl_animation_object_group_object_del(Eo
/* Delete member object data and remove the data from the member object
* data list. */
_member_anim_obj_data_del(pd, anim_obj);
-
- /* Total duration is calculated in
- * efl_animation_object_total_duration_get() based on the current group
- * animation object list.
- * Therefore, the calculated total duration should be set to update total
- * duration. */
- double total_duration = efl_animation_object_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(eo_obj, total_duration);
}
EOLIAN static double
diff --git a/src/lib/evas/canvas/efl_animation_object_private.h b/src/lib/evas/canvas/efl_animation_object_private.h
index 578e478537..27e9d13ea7 100644
--- a/src/lib/evas/canvas/efl_animation_object_private.h
+++ b/src/lib/evas/canvas/efl_animation_object_private.h
@@ -34,7 +34,6 @@ typedef struct _Efl_Animation_Object_Data
double progress;
double duration;
- double total_duration;
double paused_time;
Efl_Animation_Object_Repeat_Mode repeat_mode;
diff --git a/src/lib/evas/canvas/efl_animation_private.h b/src/lib/evas/canvas/efl_animation_private.h
index 0d79ae901e..626eb78eb9 100644
--- a/src/lib/evas/canvas/efl_animation_private.h
+++ b/src/lib/evas/canvas/efl_animation_private.h
@@ -11,7 +11,6 @@ typedef struct _Efl_Animation_Data
Efl_Canvas_Object *target;
double duration;
- double total_duration;
double start_delay_time;
diff --git a/src/lib/evas/canvas/efl_animation_rotate.c b/src/lib/evas/canvas/efl_animation_rotate.c
index 18edfa5465..f1238f71d9 100644
--- a/src/lib/evas/canvas/efl_animation_rotate.c
+++ b/src/lib/evas/canvas/efl_animation_rotate.c
@@ -182,9 +182,6 @@ _efl_animation_rotate_efl_animation_object_create(Eo *eo_obj,
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(anim_obj, total_duration);
-
double start_delay_time = efl_animation_start_delay_get(eo_obj);
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
diff --git a/src/lib/evas/canvas/efl_animation_scale.c b/src/lib/evas/canvas/efl_animation_scale.c
index da676910b6..c34ddf7e8b 100644
--- a/src/lib/evas/canvas/efl_animation_scale.c
+++ b/src/lib/evas/canvas/efl_animation_scale.c
@@ -208,9 +208,6 @@ _efl_animation_scale_efl_animation_object_create(Eo *eo_obj,
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(anim_obj, total_duration);
-
double start_delay_time = efl_animation_start_delay_get(eo_obj);
efl_animation_object_start_delay_set(anim_obj, start_delay_time);
diff --git a/src/lib/evas/canvas/efl_animation_translate.c b/src/lib/evas/canvas/efl_animation_translate.c
index 074971d294..4dad1d87ea 100644
--- a/src/lib/evas/canvas/efl_animation_translate.c
+++ b/src/lib/evas/canvas/efl_animation_translate.c
@@ -150,9 +150,6 @@ _efl_animation_translate_efl_animation_object_create(Eo *eo_obj,
double duration = efl_animation_duration_get(eo_obj);
efl_animation_object_duration_set(anim_obj, duration);
- double total_duration = efl_animation_total_duration_get(eo_obj);
- efl_animation_object_total_duration_set(anim_obj, total_duration);
-
double start_delay_time = efl_animation_start_delay_get(eo_obj);
efl_animation_object_start_delay_set(anim_obj, start_delay_time);