Skip to main content

check_animation_cross_path_equivalence

Function check_animation_cross_path_equivalence 

Source
pub fn check_animation_cross_path_equivalence<E, D>(
    enc: E,
    dec: D,
    frames: &[TestImage],
) -> Conformance
Expand description

Every animation decode path yields identical frames, matching the input.

Encodes the frames via the animation encoder, then decodes the result three ways — render_next_frame (borrowed canvas), render_next_frame_owned, and render_next_frame_to_sink (push model) — and asserts all three produce the same frame count and the same per-frame pixels as the input. The borrowed path is the usual source of bugs: its frame aliases the decoder’s canvas and is invalidated by the next call, so a codec that composites in place can leak the wrong frame.

Skipped (returns Ok) when either end does not advertise animation.