Skip to content

Releases: alexheretic/glyph-brush

glyph-brush-0.4.3

27 Apr 18:48
678142e
Compare
Choose a tag to compare
  • Fix cached vertices erroneously remaining valid after screen dimension change.
  • Update hashbrown -> 0.3.

gfx-glyph-0.14.1

19 Apr 11:50
677e798
Compare
Choose a tag to compare
  • Enlarge textures within GL_MAX_TEXTURE_SIZE if possible.

glyph-brush-0.4.2

14 Apr 14:19
5a5aa0d
Compare
Choose a tag to compare
  • Wasm32: Avoid using random state in the default hasher.

glyph-brush-0.4.1

15 Feb 17:34
9b26f1d
Compare
Choose a tag to compare
  • Change default section hasher to xxHash as seahash has been shown to collide easily in 32bit environments.

gfx-glyph-0.14

12 Feb 22:24
7086cbd
Compare
Choose a tag to compare
  • Update gfx -> 0.18.

glyph-brush-layout-0.1.5

08 Feb 09:43
8e6329c
Compare
Choose a tag to compare
  • 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

08 Feb 09:49
889cfa1
Compare
Choose a tag to compare
  • 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.

  • 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 type V 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

08 Feb 09:54
8f1e7a0
Compare
Choose a tag to compare
  • Update glyph_brush -> 0.4, big performance improvements for changing sections.

glyph-brush-layout-0.1.4

01 Feb 09:37
0a4aa71
Compare
Choose a tag to compare
  • Implement PartialEq for SectionGeometry & SectionText.

glyph-brush-0.3

01 Feb 09:37
876025a
Compare
Choose a tag to compare
  • Add GlyphCruncher::fonts() to common trait, hoisted from direct implementations. Add something like the following if you implement GlyphCruncher.
    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 *Sections
  • Implement Clone, PartialEq for BrushError
  • Implement Debug, Clone for other public things.
  • Add GlyphBrush::queue_pre_positioned for fully custom glyph positioning.