mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
Moves to FxHashMap for Allocator, BHM, Canvas, Media, Servo, WebGL and WebGPU (#39202)
This moves more of HashMap/FnvHashMap to FxHashmap. Again we only changed instances that do not look security related and have small keys. Additionally, allocator used the fnv feature which did not seem to be used. Testing: Unit Tests and WPT should cover this and functionality change is highly unlikely. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
228b240635
commit
d2c78db981
19 changed files with 53 additions and 46 deletions
|
@ -14,7 +14,7 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
compositing_traits = { workspace = true }
|
||||
euclid = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
ipc-channel = { workspace = true }
|
||||
log = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
|
|
@ -6,9 +6,9 @@ use std::sync::{Arc, Mutex};
|
|||
use std::thread;
|
||||
|
||||
use compositing_traits::{WebrenderExternalImageRegistry, WebrenderImageHandlerType};
|
||||
use fnv::FnvHashMap;
|
||||
use ipc_channel::ipc::{IpcSender, channel};
|
||||
use log::{trace, warn};
|
||||
use rustc_hash::FxHashMap;
|
||||
use webrender_api::ExternalImageId;
|
||||
|
||||
/// GL player threading API entry point that lives in the
|
||||
|
@ -19,7 +19,7 @@ use crate::{GLPlayerMsg, GLPlayerMsgForward};
|
|||
/// a set of video players with GL render.
|
||||
pub struct GLPlayerThread {
|
||||
/// Map of live players.
|
||||
players: FnvHashMap<u64, IpcSender<GLPlayerMsgForward>>,
|
||||
players: FxHashMap<u64, IpcSender<GLPlayerMsgForward>>,
|
||||
/// List of registered webrender external images.
|
||||
/// We use it to get an unique ID for new players.
|
||||
external_images: Arc<Mutex<WebrenderExternalImageRegistry>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue