From cac01edf801369784633d1753a31e87c6a762c4a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sat, 1 Aug 2015 17:14:14 -0700 Subject: style: Switch animation timestamps to be doubles instead of floats. 32-bit floats are not enough to hold timestamps since the epoch and result in jank. --- components/script/layout_interface.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components/script/layout_interface.rs') diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index 092938b8797..8fcb298880c 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -208,15 +208,15 @@ pub struct Animation { /// A description of the property animation that is occurring. pub property_animation: PropertyAnimation, /// The start time of the animation, as returned by `time::precise_time_s()`. - pub start_time: f32, + pub start_time: f64, /// The end time of the animation, as returned by `time::precise_time_s()`. - pub end_time: f32, + pub end_time: f64, } impl Animation { /// Returns the duration of this animation in seconds. #[inline] - pub fn duration(&self) -> f32 { + pub fn duration(&self) -> f64 { self.end_time - self.start_time } } -- cgit v1.2.3