diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index 14f287c3..520a11a0 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -4237,8 +4237,6 @@ struct wuffs_wbmp__decoder__struct { uint32_t f_width; uint32_t f_height; uint8_t f_call_sequence; - bool f_seen_frame; - bool f_seen_frame_config; uint64_t f_frame_config_io_position; wuffs_base__pixel_swizzler f_swizzler; @@ -13317,7 +13315,6 @@ wuffs_wbmp__decoder__decode_frame_config(wuffs_wbmp__decoder* self, self->private_impl.f_frame_config_io_position, 0, true, false, 4278190080); } - self->private_impl.f_seen_frame_config = true; self->private_impl.f_call_sequence = 2; goto ok; @@ -13471,7 +13468,6 @@ wuffs_wbmp__decoder__decode_frame(wuffs_wbmp__decoder* self, v_dst_y += 1; } } - self->private_impl.f_seen_frame = true; self->private_impl.f_call_sequence = 3; goto ok; @@ -13544,7 +13540,6 @@ wuffs_wbmp__decoder__skip_frame(wuffs_wbmp__decoder* self, goto suspend; } iop_a_src += self->private_data.s_skip_frame[0].scratch; - self->private_impl.f_seen_frame = true; self->private_impl.f_call_sequence = 3; goto ok; @@ -13680,7 +13675,7 @@ wuffs_wbmp__decoder__num_decoded_frame_configs( return 0; } - if (self->private_impl.f_seen_frame_config) { + if (self->private_impl.f_call_sequence > 1) { return 1; } return 0; @@ -13698,7 +13693,7 @@ wuffs_wbmp__decoder__num_decoded_frames(const wuffs_wbmp__decoder* self) { return 0; } - if (self->private_impl.f_seen_frame) { + if (self->private_impl.f_call_sequence > 2) { return 1; } return 0; @@ -13727,8 +13722,6 @@ wuffs_wbmp__decoder__restart_frame(wuffs_wbmp__decoder* self, return wuffs_base__make_status(wuffs_base__error__bad_argument); } self->private_impl.f_call_sequence = 1; - self->private_impl.f_seen_frame = false; - self->private_impl.f_seen_frame_config = false; self->private_impl.f_frame_config_io_position = a_io_position; return wuffs_base__make_status(NULL); } diff --git a/std/wbmp/decode_wbmp.wuffs b/std/wbmp/decode_wbmp.wuffs index 89004c41..ed2306cc 100644 --- a/std/wbmp/decode_wbmp.wuffs +++ b/std/wbmp/decode_wbmp.wuffs @@ -22,8 +22,6 @@ pub struct decoder? implements base.image_decoder( call_sequence : base.u8, - seen_frame : base.bool, - seen_frame_config : base.bool, frame_config_io_position : base.u64, swizzler : base.pixel_swizzler, @@ -122,7 +120,6 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_ background_color: 0xFF000000) } - this.seen_frame_config = true this.call_sequence = 2 } @@ -196,7 +193,6 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, } } - this.seen_frame = true this.call_sequence = 3 } @@ -209,7 +205,6 @@ pri func decoder.skip_frame?(src: base.io_reader) { args.src.skip?(n: total_bytes) - this.seen_frame = true this.call_sequence = 3 } @@ -240,14 +235,14 @@ pub func decoder.num_animation_loops() base.u32 { } pub func decoder.num_decoded_frame_configs() base.u64 { - if this.seen_frame_config { + if this.call_sequence > 1 { return 1 } return 0 } pub func decoder.num_decoded_frames() base.u64 { - if this.seen_frame { + if this.call_sequence > 2 { return 1 } return 0 @@ -261,8 +256,6 @@ pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.sta return base."#bad argument" } this.call_sequence = 1 - this.seen_frame = false - this.seen_frame_config = false this.frame_config_io_position = args.io_position return ok }