hecrj / wgpu_glyph

A fast text renderer for wgpu (https://github.com/gfx-rs/wgpu)
https://docs.rs/wgpu_glyph
MIT License
443 stars 77 forks source link

Fix cache resizes #9

Closed hecrj closed 4 years ago

hecrj commented 4 years ago

Fixes #7 and fixes #8.

This was quite a silly bug :sweat_smile: Basically, we were updating the old cache instead of the new one when a resize happened.

I have improved the internal API safety. Now, the Cache type does not leak outside Pipeline. Therefore, all mutations to it need to go through the Cache owner.

@rukai, let me know if the fix works for you!

rukai commented 4 years ago

Thanks! Yep, this definitely fixes #7

8 happens infrequently, I think its safe to assume it will be fixed by this as well. It can be closed.