Stop reusing SwashCache in text::Pipeline
`SwashCache` can't be easily trimmed and it's not really getting us anything since `glyphon` already caches using a glyph atlas anyways.
This commit is contained in:
parent
32309f0140
commit
6cf4a10906
1 changed files with 1 additions and 7 deletions
|
|
@ -23,10 +23,6 @@ pub struct Pipeline {
|
|||
struct System {
|
||||
fonts: glyphon::FontSystem,
|
||||
|
||||
#[borrows(fonts)]
|
||||
#[not_covariant]
|
||||
cache: glyphon::SwashCache<'this>,
|
||||
|
||||
#[borrows(fonts)]
|
||||
#[not_covariant]
|
||||
measurement_cache: RefCell<Cache<'this>>,
|
||||
|
|
@ -52,7 +48,6 @@ impl Pipeline {
|
|||
))]
|
||||
.into_iter(),
|
||||
),
|
||||
cache_builder: |fonts| glyphon::SwashCache::new(fonts),
|
||||
measurement_cache_builder: |_| RefCell::new(Cache::new()),
|
||||
render_cache_builder: |_| Cache::new(),
|
||||
}
|
||||
|
|
@ -76,7 +71,6 @@ impl Pipeline {
|
|||
self.system = Some(
|
||||
SystemBuilder {
|
||||
fonts: glyphon::FontSystem::new_with_locale_and_db(locale, db),
|
||||
cache_builder: |fonts| glyphon::SwashCache::new(fonts),
|
||||
measurement_cache_builder: |_| RefCell::new(Cache::new()),
|
||||
render_cache_builder: |_| Cache::new(),
|
||||
}
|
||||
|
|
@ -183,7 +177,7 @@ impl Pipeline {
|
|||
},
|
||||
&text_areas,
|
||||
glyphon::Color::rgb(0, 0, 0),
|
||||
fields.cache,
|
||||
&mut glyphon::SwashCache::new(fields.fonts),
|
||||
)
|
||||
.expect("Prepare text sections");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue