aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-02-05 07:32:13 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-02-05 07:32:13 +0530
commit87aaa5ffe0ca7da8771883ea40d04d7c1449eea9 (patch)
tree03a2e5730027f8236ef2ad3930f67c742b1d231f /components/layout/layout_thread.rs
parent2a6707ce58df27d93e865bffb6b44d396b810c99 (diff)
parent95be0b9a25c288ef8fa0f340d0be6a241e9e1ecc (diff)
downloadservo-87aaa5ffe0ca7da8771883ea40d04d7c1449eea9.tar.gz
servo-87aaa5ffe0ca7da8771883ea40d04d7c1449eea9.zip
Auto merge of #9523 - ruud-v-a:hasher, r=Wafflespeanut
Upgrade to new Hasher API This fixes #9494. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9523) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r--components/layout/layout_thread.rs8
1 files changed, 4 insertions, 4 deletions
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);