mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Remove wbmp seen_etc fields
This commit is contained in:
1 parent
0d0a74c9a8
commit
149204c14e
2 files changed
+4
-18
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user