LiveSplit / livesplit-core

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
https://livesplit.org/
Apache License 2.0
209 stars 56 forks source link

Improve Layer Separations #798

Closed CryZe closed 2 months ago

CryZe commented 2 months ago

This improves the code that splits the rendered entities into the bottom and top layers. The top layer is intended to be used for entities that update frequently. This was mostly done pretty well before, but with the web renderer it has been quite easy to find cases that could be improved:

  1. The graph used to always be rendered onto the top layer. This does not need to be the case when the timer is paused or just not running at all.
  2. Game Time can change all the time, even if the timer is paused. So this is taken into account everywhere now.
  3. Columns didn't consider pausing at all either.
  4. There was a bug in the web renderer where a brightness of 0 was considered as the default for brightness and thus no brightness change was applied. This should've been at 1.
  5. The new Rust release brought some new clippy lints around string buffer reusage that were addressed.