diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2015-08-01 17:14:14 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2015-08-01 17:46:39 -0700 |
commit | cac01edf801369784633d1753a31e87c6a762c4a (patch) | |
tree | ddb87024a004cc5dfb67dbeb26db5332676617ce /components/script/layout_interface.rs | |
parent | c6b043582b41434c59a21eed5c9258ae3c0fb437 (diff) | |
download | servo-cac01edf801369784633d1753a31e87c6a762c4a.tar.gz servo-cac01edf801369784633d1753a31e87c6a762c4a.zip |
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.
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r-- | components/script/layout_interface.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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 } } |