Prepare benchmarks + ~1.7x prepare perf improvement (#121)
* Add prepare benchmarks * Skip unnecessary peaks * Cite sample sources
This commit is contained in:
parent
db2c1ca316
commit
28512c8630
8 changed files with 964 additions and 43 deletions
|
@ -107,16 +107,6 @@ impl InnerAtlas {
|
|||
self.kind.num_channels()
|
||||
}
|
||||
|
||||
pub(crate) fn promote(&mut self, glyph: CacheKey) {
|
||||
self.glyph_cache.promote(&glyph);
|
||||
self.glyphs_in_use.insert(glyph);
|
||||
}
|
||||
|
||||
pub(crate) fn put(&mut self, glyph: CacheKey, details: GlyphDetails) {
|
||||
self.glyph_cache.put(glyph, details);
|
||||
self.glyphs_in_use.insert(glyph);
|
||||
}
|
||||
|
||||
pub(crate) fn grow(
|
||||
&mut self,
|
||||
device: &wgpu::Device,
|
||||
|
@ -327,13 +317,6 @@ impl TextAtlas {
|
|||
did_grow
|
||||
}
|
||||
|
||||
pub(crate) fn glyph(&self, glyph: &CacheKey) -> Option<&GlyphDetails> {
|
||||
self.mask_atlas
|
||||
.glyph_cache
|
||||
.peek(glyph)
|
||||
.or_else(|| self.color_atlas.glyph_cache.peek(glyph))
|
||||
}
|
||||
|
||||
pub(crate) fn inner_for_content_mut(&mut self, content_type: ContentType) -> &mut InnerAtlas {
|
||||
match content_type {
|
||||
ContentType::Color => &mut self.color_atlas,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue