Cache rustybuzz shape plans.

This commit is contained in:
David Stern 2023-12-18 18:10:09 -05:00
parent 94e6cdefda
commit 73acfb0962
7 changed files with 98 additions and 17 deletions

View file

@ -108,8 +108,8 @@ mod buffer;
pub use self::buffer_line::*;
mod buffer_line;
pub use self::cache::*;
mod cache;
pub use self::glyph_cache::*;
mod glyph_cache;
pub use self::edit::*;
mod edit;
@ -123,7 +123,17 @@ mod layout;
pub use self::shape::*;
mod shape;
use self::shape_plan_cache::*;
mod shape_plan_cache;
#[cfg(feature = "swash")]
pub use self::swash::*;
#[cfg(feature = "swash")]
mod swash;
type BuildHasher = core::hash::BuildHasherDefault<rustc_hash::FxHasher>;
#[cfg(feature = "std")]
type HashMap<K, V> = std::collections::HashMap<K, V, BuildHasher>;
#[cfg(not(feature = "std"))]
type HashMap<K, V> = hashbrown::HashMap<K, V, BuildHasher>;