Reorder cache key
This commit is contained in:
parent
a1d4553a17
commit
2206193fff
3 changed files with 12 additions and 12 deletions
|
|
@ -11,7 +11,7 @@ pub struct FontLayoutGlyph<'a> {
|
|||
#[cfg(feature = "rusttype")]
|
||||
pub inner: rusttype::PositionedGlyph<'a>,
|
||||
#[cfg(feature = "swash")]
|
||||
pub inner: (i32, i32, CacheKey),
|
||||
pub inner: (CacheKey, i32, i32),
|
||||
}
|
||||
|
||||
pub struct FontLayoutLine<'a> {
|
||||
|
|
@ -56,7 +56,7 @@ impl<'a> FontLayoutLine<'a> {
|
|||
|
||||
let mut cache = glyph.font.cache.lock().unwrap();
|
||||
|
||||
let (x_int, y_int, cache_key) = glyph.inner;
|
||||
let (cache_key, x_int, y_int) = glyph.inner;
|
||||
|
||||
let image_opt = cache.entry(cache_key).or_insert_with(|| {
|
||||
let mut scale_context = glyph.font.scale_context.lock().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue