Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace img_hash dependency #725

Merged
merged 1 commit into from
Sep 24, 2023
Merged

Conversation

CryZe
Copy link
Collaborator

@CryZe CryZe commented Sep 24, 2023

While a visual hash is a good idea, the underlying tiny-skia is meant to pixel perfectly match Skia. This means that our hash doesn't actually need to be visual and can be a simple checksum. The img_hash crate is very unmaintained, so we are forced to compile ever more so outdated dependencies. So replacing it by a simple checksum via the seahash crate makes a lot of sense. The seahash crate claims to be very fast and also claims that the hashes are suitable for checksums. So it sounds like a good crate to use for this. However this means that on platforms that don't correctly implement IEEE-754, we can't run the rendering tests anymore.

@CryZe CryZe added enhancement An improvement for livesplit-core. dependencies A dependency needs to be updated. rendering The issue or pull request is affecting the rendering. code quality Affects the quality of the code. labels Sep 24, 2023
@CryZe CryZe added this to the v0.14 milestone Sep 24, 2023
While a visual hash is a good idea, the underlying `tiny-skia` is meant
to pixel perfectly match `Skia`. This means that our hash doesn't
actually need to be visual and can be a simple checksum. The `img_hash`
crate is very unmaintained, so we are forced to compile ever more so
outdated dependencies. So replacing it by a simple checksum via the
`seahash` crate makes a lot of sense. The `seahash` crate claims to be
very fast and also claims that the hashes are suitable for checksums. So
it sounds like a good crate to use for this. However this means that on
platforms that don't correctly implement IEEE-754, we can't run the
rendering tests anymore.

However when it comes to font fallback, it does seem like there's some
changes between Windows 10 and 11, so we do need to differentiate
between those now.
@CryZe CryZe merged commit fb1c387 into LiveSplit:master Sep 24, 2023
77 checks passed
@CryZe CryZe deleted the replace-img-hash branch September 24, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Affects the quality of the code. dependencies A dependency needs to be updated. enhancement An improvement for livesplit-core. rendering The issue or pull request is affecting the rendering.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant