get_glyph_atlas_info
refactor (#17044)
# Objective Return a `GlyphAtlasInfo` instead of a tuple from the inner block so we can remove the outer mapping.
This commit is contained in:
parent
c890cc9dc3
commit
d2f61e24e7
@ -179,22 +179,15 @@ impl FontAtlasSet {
|
||||
self.font_atlases
|
||||
.get(&FontAtlasKey(cache_key.font_size_bits, font_smoothing))
|
||||
.and_then(|font_atlases| {
|
||||
font_atlases
|
||||
.iter()
|
||||
.find_map(|atlas| {
|
||||
atlas.get_glyph_index(cache_key).map(|location| {
|
||||
(
|
||||
location,
|
||||
atlas.texture_atlas.clone_weak(),
|
||||
atlas.texture.clone_weak(),
|
||||
)
|
||||
font_atlases.iter().find_map(|atlas| {
|
||||
atlas
|
||||
.get_glyph_index(cache_key)
|
||||
.map(|location| GlyphAtlasInfo {
|
||||
location,
|
||||
texture_atlas: atlas.texture_atlas.clone_weak(),
|
||||
texture: atlas.texture.clone_weak(),
|
||||
})
|
||||
})
|
||||
.map(|(location, texture_atlas, texture)| GlyphAtlasInfo {
|
||||
texture_atlas,
|
||||
location,
|
||||
texture,
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user