More changes to HashMap/HashSet to use fxhash (#39244)

Moved more functions to fxhash. And provide comments about the choices
when necessary.


Testing: Hash functions shouldn't change functionality.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger 2025-09-29 11:51:17 +02:00 committed by GitHub
parent 389f0d4cc2
commit 32b656adf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 16 deletions

View file

@ -3,7 +3,6 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::cell::{Cell, Ref, RefCell};
use std::collections::HashMap;
use std::collections::hash_map::Entry;
use std::env;
use std::fs::create_dir_all;
@ -1693,9 +1692,9 @@ struct FrameDelayer {
/// The latest [`Epoch`] of canvas images that have been sent to WebRender. Note
/// that this only records the `Epoch`s for canvases and only ones that are involved
/// in "update the rendering".
image_epochs: HashMap<ImageKey, Epoch>,
image_epochs: FxHashMap<ImageKey, Epoch>,
/// A map of all pending canvas images
pending_canvas_images: HashMap<ImageKey, Epoch>,
pending_canvas_images: FxHashMap<ImageKey, Epoch>,
/// Whether or not we have a pending frame.
pending_frame: bool,
/// A list of pipelines that should be notified when we are no longer waiting for