mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
std/lzw: have flush return a roslice
This commit is contained in:
1 parent
c914f66a6c
commit
65924cd44d
2 files changed
+5
-5
No files matched your search
@@ -916,7 +916,7 @@ pri func decoder.decode_id_part2?(dst: ptr base.pixel_buffer, src: base.io_reade
|
|||||||
var mark : base.u64
|
var mark : base.u64
|
||||||
var lzw_status : base.status
|
var lzw_status : base.status
|
||||||
var copy_status : base.status
|
var copy_status : base.status
|
||||||
var uncompressed : slice base.u8
|
var uncompressed : roslice base.u8
|
||||||
|
|
||||||
need_block_size = true
|
need_block_size = true
|
||||||
while.outer true {
|
while.outer true {
|
||||||
@@ -1015,10 +1015,10 @@ pri func decoder.decode_id_part2?(dst: ptr base.pixel_buffer, src: base.io_reade
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pri func decoder.copy_to_image_buffer!(pb: ptr base.pixel_buffer, src: slice base.u8) base.status {
|
pri func decoder.copy_to_image_buffer!(pb: ptr base.pixel_buffer, src: roslice base.u8) base.status {
|
||||||
// TODO: don't assume an interleaved pixel format.
|
// TODO: don't assume an interleaved pixel format.
|
||||||
var dst : slice base.u8
|
var dst : slice base.u8
|
||||||
var src : slice base.u8
|
var src : roslice base.u8
|
||||||
var width_in_bytes : base.u64
|
var width_in_bytes : base.u64
|
||||||
var n : base.u64
|
var n : base.u64
|
||||||
var src_ri : base.u64
|
var src_ri : base.u64
|
||||||
@@ -1031,7 +1031,7 @@ pri func decoder.copy_to_image_buffer!(pb: ptr base.pixel_buffer, src: slice bas
|
|||||||
var replicate_y0 : base.u32
|
var replicate_y0 : base.u32
|
||||||
var replicate_y1 : base.u32
|
var replicate_y1 : base.u32
|
||||||
var replicate_dst : slice base.u8
|
var replicate_dst : slice base.u8
|
||||||
var replicate_src : slice base.u8
|
var replicate_src : roslice base.u8
|
||||||
|
|
||||||
// TODO: the pixfmt variable shouldn't be necessary. We should be able to
|
// TODO: the pixfmt variable shouldn't be necessary. We should be able to
|
||||||
// chain the two calls: "args.pb.pixel_format().bits_per_pixel()".
|
// chain the two calls: "args.pb.pixel_format().bits_per_pixel()".
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ pri func decoder.write_to?(dst: base.io_writer) {
|
|||||||
} endwhile
|
} endwhile
|
||||||
}
|
}
|
||||||
|
|
||||||
pub func decoder.flush!() slice base.u8 {
|
pub func decoder.flush!() roslice base.u8 {
|
||||||
var s : slice base.u8
|
var s : slice base.u8
|
||||||
|
|
||||||
if this.output_ri <= this.output_wi {
|
if this.output_ri <= this.output_wi {
|
||||||
|
|||||||
Reference in new issue
Block a user