ImageDataType::Rgba8 carries the sha256 of its pixels, set wherever one
is built and refreshed wherever the pixels are mutated.
compute_hash always re-hashed the pixels to produce same stored hash.
Image hashing ran 3 times for every transmitted image:
- once in new_single_frame on image creation
- once for the cache key in raw_image_to_image_data
- once more in ImageData::with_data on the miss path
A 2400x1440 RGBA frame is 13.18MiB, so a client transmitting frames at
60fps spends most of its time budget there.
AnimRgba8 keeps hashing, because its stored hashes are per-frame, not
global, which compute_hash needs (all frames + their durations).
---------
Co-authored-by: Ido Samuelson <i-am-logger@users.noreply.github.com>