diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/context.rs | 4 | ||||
-rw-r--r-- | components/layout/layout_thread.rs | 8 | ||||
-rw-r--r-- | components/layout/lib.rs | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/components/layout/context.rs b/components/layout/context.rs index 134a6f03b2b..7eb01a68846 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -21,7 +21,7 @@ use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResp use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder}; use std::cell::{RefCell, RefMut}; use std::collections::HashMap; -use std::collections::hash_state::DefaultState; +use std::hash::BuildHasherDefault; use std::rc::Rc; use std::sync::mpsc::Sender; use std::sync::{Arc, Mutex}; @@ -96,7 +96,7 @@ pub struct SharedLayoutContext { pub canvas_layers_sender: Mutex<Sender<(LayerId, IpcSender<CanvasMsg>)>>, /// The visible rects for each layer, as reported to us by the compositor. - pub visible_rects: Arc<HashMap<LayerId, Rect<Au>, DefaultState<FnvHasher>>>, + pub visible_rects: Arc<HashMap<LayerId, Rect<Au>, BuildHasherDefault<FnvHasher>>>, } pub struct LayoutContext<'a> { diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index 2b1950d88ce..8599b89cc2d 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -55,7 +55,7 @@ use serde_json; use std::borrow::ToOwned; use std::cell::RefCell; use std::collections::HashMap; -use std::collections::hash_state::DefaultState; +use std::hash::BuildHasherDefault; use std::ops::{Deref, DerefMut}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::mpsc::{channel, Sender, Receiver}; @@ -195,7 +195,7 @@ pub struct LayoutThread { /// The position and size of the visible rect for each layer. We do not build display lists /// for any areas more than `DISPLAY_PORT_SIZE_FACTOR` screens away from this area. - visible_rects: Arc<HashMap<LayerId, Rect<Au>, DefaultState<FnvHasher>>>, + visible_rects: Arc<HashMap<LayerId, Rect<Au>, BuildHasherDefault<FnvHasher>>>, /// The list of currently-running animations. running_animations: Arc<RwLock<HashMap<OpaqueNode, Vec<Animation>>>>, @@ -430,7 +430,7 @@ impl LayoutThread { new_animations_receiver: new_animations_receiver, outstanding_web_fonts: outstanding_web_fonts_counter, root_flow: None, - visible_rects: Arc::new(HashMap::with_hash_state(Default::default())), + visible_rects: Arc::new(HashMap::with_hasher(Default::default())), running_animations: Arc::new(RwLock::new(HashMap::new())), expired_animations: Arc::new(RwLock::new(HashMap::new())), epoch: Epoch(0), @@ -1099,7 +1099,7 @@ impl LayoutThread { // layers have moved more than `DISPLAY_PORT_THRESHOLD_SIZE_FACTOR` away from their last // positions. let mut must_regenerate_display_lists = false; - let mut old_visible_rects = HashMap::with_hash_state(Default::default()); + let mut old_visible_rects = HashMap::with_hasher(Default::default()); let inflation_amount = Size2D::new(self.viewport_size.width * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR, self.viewport_size.height * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR); diff --git a/components/layout/lib.rs b/components/layout/lib.rs index a3b78e8c4bd..85f70270148 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -6,7 +6,6 @@ #![feature(box_syntax)] #![feature(cell_extras)] #![feature(custom_derive)] -#![feature(hashmap_hasher)] #![feature(mpsc_select)] #![feature(nonzero)] #![feature(plugin)] |