Move Epoch to gfx_traits

Resolves #9222. Moved Epoch from components/msg/compositor_msg to
components/gfx_traits/lib. Updated use statements to reflect the move.
This commit is contained in:
John DeSilva 2016-01-09 15:26:58 -05:00
parent 85792d2819
commit f32995543d
12 changed files with 26 additions and 28 deletions

View file

@ -125,3 +125,14 @@ pub struct LayerProperties {
/// Whether this layer scrolls its overflow area.
pub scrolls_overflow_area: bool,
}
/// A newtype struct for denoting the age of messages; prevents race conditions.
#[derive(PartialEq, Eq, Debug, Copy, Clone, PartialOrd, Ord, Deserialize, Serialize)]
pub struct Epoch(pub u32);
impl Epoch {
pub fn next(&mut self) {
let Epoch(ref mut u) = *self;
*u += 1;
}
}