Flutter Engine
The Flutter Engine
|
Functions | |
uint32_t | Hash32 (const void *data, size_t bytes, uint32_t seed) |
uint64_t | Hash64 (const void *data, size_t bytes, uint64_t seed) |
static uint32_t | Mix (uint32_t hash) |
static uint32_t | CheapMix (uint32_t hash) |
Our hash functions are exposed as SK_SPI (e.g. SkParagraph)
|
inlinestatic |
uint32_t -> uint32_t hash, useful for when you're about to truncate this hash but you suspect its low bits aren't well mixed.
This version is 2-lines cheaper than Mix, but seems to be sufficient for the font cache.
Definition at line 45 of file SkChecksum.h.
uint32_t SK_SPI SkChecksum::Hash32 | ( | const void * | data, |
size_t | bytes, | ||
uint32_t | seed = 0 |
||
) |
This is a fast, high-quality 32-bit hash. We make no guarantees about this remaining stable over time, or being consistent across devices.
For now, this is a 64-bit wyhash, truncated to 32-bits. See: https://github.com/wangyi-fudan/wyhash
Definition at line 113 of file SkChecksum.cpp.
uint64_t SK_SPI SkChecksum::Hash64 | ( | const void * | data, |
size_t | bytes, | ||
uint64_t | seed = 0 |
||
) |
This is a fast, high-quality 64-bit hash. We make no guarantees about this remaining stable over time, or being consistent across devices.
For now, this is a 64-bit wyhash. See: https://github.com/wangyi-fudan/wyhash
Definition at line 117 of file SkChecksum.cpp.
|
inlinestatic |
uint32_t -> uint32_t hash, useful for when you're about to truncate this hash but you suspect its low bits aren't well mixed.
This is the Murmur3 finalizer.
Definition at line 30 of file SkChecksum.h.