Releases: alexheretic/glyph-brush
glyph-brush-0.4.3
- Fix cached vertices erroneously remaining valid after screen dimension change.
- Update hashbrown ->
0.3
.
gfx-glyph-0.14.1
- Enlarge textures within
GL_MAX_TEXTURE_SIZE
if possible.
glyph-brush-0.4.2
- Wasm32: Avoid using random state in the default hasher.
glyph-brush-0.4.1
- Change default section hasher to xxHash as seahash has been shown to collide easily in 32bit environments.
gfx-glyph-0.14
- Update gfx ->
0.18
.
glyph-brush-layout-0.1.5
- Add
GlyphPositioner::recalculate_glyphs
with a default unoptimised implementation. Custom layouts won't be broken by this change, but will need to implement the new function to provide optimised behaviour. - Optimise built-in layout's recalculate_glyphs for screen position changes with
GlyphChange::Geometry
. - Optimise built-in layout's recalculate_glyphs for single color changes with
GlyphChange::Color
. - Optimise built-in layout's recalculate_glyphs for alpha changes with
GlyphChange::Alpha
. - Optimise layout re-positioning with
PositionedGlyph::set_position
usage.
glyph-brush-0.4
-
Use queue call counting & fine grained hashing to match up previous calls with current calls figuring out what has changed allowing optimised use of
recalculate_glyphs
for fast layouts.- Compute if just geometry (ie section position) has changed ->
GlyphChange::Geometry
. - Compute if just color has changed ->
GlyphChange::Color
. - Compute if just alpha has changed ->
GlyphChange::Alpha
.
Provides much faster re-layout performance in these common change scenarios.
- Compute if just geometry (ie section position) has changed ->
-
GlyphBrush
now generates & caches vertices avoiding regeneration of individual unchanged sections, when another section change forces regeneration of the complete vertex array. The user vertex typeV
is now in the struct signature.pub struct DownstreamGlyphBrush<'font, H = DefaultSectionHasher> { // previously: glyph_brush::GlyphBrush<'font, H>, inner: glyph_brush::GlyphBrush<'font, DownstreamGlyphVertex, H>, ... }
These changes result in a big performance improvement for changes to sections amongst other unchanging sections, which is a fairly common thing to want to do. Fully cached (everything unchanging) & worst-case (everything changing/new) are not significantly affected.
name control ns/iter change ns/iter diff ns/iter diff % speedup
continually_modify_alpha_of_1_of_3 854,554 349,165 -505,389 -59.14% x 2.45
continually_modify_bounds_of_1_of_3 865,162 643,341 -221,821 -25.64% x 1.34
continually_modify_color_of_1_of_3 855,189 344,501 -510,688 -59.72% x 2.48
continually_modify_end_text_of_1_of_3 857,913 647,491 -210,422 -24.53% x 1.32
continually_modify_middle_text_of_1_of_3 856,383 642,055 -214,328 -25.03% x 1.33
continually_modify_position_of_1_of_3 866,298 355,794 -510,504 -58.93% x 2.43
continually_modify_start_text_of_1_of_3 872,081 654,887 -217,194 -24.91% x 1.33
no_cache_render_3_medium_sections_fully 1,480,556 1,500,286 19,730 1.33% x 0.99
render_3_medium_sections_fully 1,136 1,066 -70 -6.16% x 1.07
gfx-glyph-0.13.3
- Update glyph_brush ->
0.4
, big performance improvements for changing sections.
glyph-brush-layout-0.1.4
- Implement
PartialEq
forSectionGeometry
&SectionText
.
glyph-brush-0.3
- Add
GlyphCruncher::fonts()
to common trait, hoisted from direct implementations. Add something like the following if you implementGlyphCruncher
.impl GlyphCruncher for Foo { // new #[inline] fn fonts(&self) -> &[Font<'font>] { self.glyph_brush.fonts() } }
- Fix 2-draw style causing texture cache thrashing. Probably a very rare bug.
- Require log
0.4.4
to fix compile issue with older versions. - Improve documentation.
- Implement
PartialEq
for*Section
s - Implement
Clone
,PartialEq
forBrushError
- Implement
Debug
,Clone
for other public things. - Add
GlyphBrush::queue_pre_positioned
for fully custom glyph positioning.