mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Simpify std/png "yield short read" loop
This commit is contained in:
1 parent
63d8564b3c
commit
a4b14a0f17
2 files changed
+2
-4
No files matched your search
@@ -40554,9 +40554,8 @@ wuffs_png__decoder__decode_frame(
|
|||||||
wuffs_png__decoder__filter_and_swizzle(self, a_dst, wuffs_base__slice_u8__subslice_j(a_workbuf, self->private_impl.f_workbuf_wi));
|
wuffs_png__decoder__filter_and_swizzle(self, a_dst, wuffs_base__slice_u8__subslice_j(a_workbuf, self->private_impl.f_workbuf_wi));
|
||||||
}
|
}
|
||||||
while (true) {
|
while (true) {
|
||||||
status = v_status;
|
status = wuffs_base__make_status(wuffs_base__suspension__short_read);
|
||||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(6);
|
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(6);
|
||||||
v_status = wuffs_base__make_status(wuffs_base__suspension__short_read);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
status = v_status;
|
status = v_status;
|
||||||
|
|||||||
@@ -1209,8 +1209,7 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
|
|||||||
this.filter_and_swizzle!(dst: args.dst, workbuf: args.workbuf[.. this.workbuf_wi])
|
this.filter_and_swizzle!(dst: args.dst, workbuf: args.workbuf[.. this.workbuf_wi])
|
||||||
}
|
}
|
||||||
while true {
|
while true {
|
||||||
yield? status
|
yield? base."$short read"
|
||||||
status = base."$short read"
|
|
||||||
} endwhile
|
} endwhile
|
||||||
}
|
}
|
||||||
yield? status
|
yield? status
|
||||||
|
|||||||
Reference in new issue
Block a user