struct weston_compositor, fade.animation);
struct weston_surface *surface;
+ if (animation->frame_counter == 0)
+ compositor->fade.spring.timestamp = msecs;
+
surface = compositor->fade.surface;
weston_spring_update(&compositor->fade.spring, msecs);
weston_surface_set_color(surface, 0.0, 0.0, 0.0,
{
struct weston_output *output;
struct weston_surface *surface;
- int done;
output = container_of(compositor->output_list.next,
struct weston_output, link);
- done = weston_spring_done(&compositor->fade.spring);
compositor->fade.spring.target = tint;
if (weston_spring_done(&compositor->fade.spring))
return;
- if (done)
- compositor->fade.spring.timestamp =
- weston_compositor_get_time();
-
if (compositor->fade.surface == NULL) {
surface = weston_surface_create(compositor);
weston_surface_configure(surface, 0, 0, 8192, 8192);
struct weston_surface *es = zoom->surface;
GLfloat scale;
+ if (animation->frame_counter == 0)
+ zoom->spring.timestamp = msecs;
+
weston_spring_update(&zoom->spring, msecs);
if (weston_spring_done(&zoom->spring)) {
weston_spring_init(&zoom->spring, 200.0, 0.0, 1.0);
zoom->spring.friction = 700;
zoom->animation.frame_counter = 0;
- zoom->spring.timestamp = weston_compositor_get_time();
zoom->animation.frame = weston_zoom_frame;
- weston_zoom_frame(&zoom->animation, NULL, zoom->spring.timestamp);
+ weston_zoom_frame(&zoom->animation, NULL, 0);
zoom->listener.notify = handle_zoom_surface_destroy;
wl_signal_add(&surface->surface.resource.destroy_signal,
struct weston_surface *es = fade->surface;
float fade_factor;
+ if (animation->frame_counter == 0)
+ fade->spring.timestamp = msecs;
+
weston_spring_update(&fade->spring, msecs);
if (weston_spring_done(&fade->spring)) {
weston_spring_init(&fade->spring, 200.0, 0, 1.0);
fade->spring.friction = 700;
fade->animation.frame_counter = 0;
- fade->spring.timestamp = weston_compositor_get_time();
fade->animation.frame = weston_fade_frame;
- weston_fade_frame(&fade->animation, NULL, fade->spring.timestamp);
+ weston_fade_frame(&fade->animation, NULL, 0);
fade->listener.notify = handle_fade_surface_destroy;
wl_signal_add(&surface->surface.resource.destroy_signal,