raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=58d5c6d3f6a63cd301620a4e9a7506a4bf41d00a

commit 58d5c6d3f6a63cd301620a4e9a7506a4bf41d00a
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Mon Dec 7 20:00:14 2015 +0900

    e randr - slicken up fade to use sinusoidal interpolation
    
    @feature
---
 src/bin/e_randr2.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c
index 7bb428f..b1e46e8 100644
--- a/src/bin/e_randr2.c
+++ b/src/bin/e_randr2.c
@@ -219,10 +219,13 @@ static Eina_Bool
 _cb_fade_animator(void *data EINA_UNUSED)
 {
    double t = ecore_loop_time_get() - _start_time;
+   const double duration = 0.5;
    int v;
 
-   t = t / 0.5;
    if (t < 0.0) t = 0.0;
+   t = t / duration;
+   if (t > 1.0) t = 1.0;
+   t = ecore_animator_pos_map(t, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0);
    v = _target_from + ((_target_to - _target_from) * t);
    if (t >= 1.0) v = _target_to;
    evas_object_color_set(_fade_obj, 0, 0, 0, v);
@@ -230,7 +233,7 @@ _cb_fade_animator(void *data EINA_UNUSED)
      {
         if (_target_to == 255)
           {
-             _apply_delay = ecore_timer_add(3.0, _cb_delay_timer, NULL);
+             _apply_delay = ecore_timer_add(5.0, _cb_delay_timer, NULL);
              _do_apply();
              _screen_check_unconfigured(e_randr2, e_randr2_cfg);
           }

-- 


Reply via email to