mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
constellation: Use FnvHashMap
for hashmaps that use ids as keys (#39106)
FNV is faster for hashing less than 16 bytes of data and the cryptographic properties of the default HashMap are not needed for the various ids. Testing: This does not change functionality. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
0ae9ee28d5
commit
5c7ea4bdee
19 changed files with 71 additions and 54 deletions
|
@ -12,7 +12,6 @@ mod layout_damage;
|
|||
pub mod wrapper_traits;
|
||||
|
||||
use std::any::Any;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicIsize, AtomicU64, Ordering};
|
||||
use std::thread::JoinHandle;
|
||||
|
@ -281,7 +280,7 @@ pub trait Layout {
|
|||
/// Set the scroll states of this layout after a compositor scroll.
|
||||
fn set_scroll_offsets_from_renderer(
|
||||
&mut self,
|
||||
scroll_states: &HashMap<ExternalScrollId, LayoutVector2D>,
|
||||
scroll_states: &FnvHashMap<ExternalScrollId, LayoutVector2D>,
|
||||
);
|
||||
|
||||
/// Get the scroll offset of the given scroll node with id of [`ExternalScrollId`] or `None` if it does
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue