mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
Add Memory::caches for caching things from one frame to the next
This commit is contained in:
@@ -405,7 +405,7 @@ struct GalleyCache {
|
||||
|
||||
impl GalleyCache {
|
||||
fn layout(&mut self, fonts: &Fonts, job: LayoutJob) -> Arc<Galley> {
|
||||
let hash = crate::util::hash_with(&job, ahash::AHasher::new_with_keys(123, 456)); // TODO: even faster hasher?
|
||||
let hash = crate::util::hash(&job); // TODO: even faster hasher?
|
||||
|
||||
match self.cache.entry(hash) {
|
||||
std::collections::hash_map::Entry::Occupied(entry) => {
|
||||
|
||||
Reference in New Issue
Block a user