Clip std/png frame_dirty_rect to frame rect

This commit is contained in:
Nigel Tao committed 2021-11-15 10:46:28 +11:00
1 parent 8f1adea523
commit fa56d92410
2 files changed
+8 -8

No files matched your search

+4 -4
View File
@@ -40259,10 +40259,10 @@ wuffs_png__decoder__frame_dirty_rect(
} }
return wuffs_base__utility__make_rect_ie_u32( return wuffs_base__utility__make_rect_ie_u32(
0, self->private_impl.f_frame_rect_x0,
0, self->private_impl.f_frame_rect_y0,
self->private_impl.f_width, self->private_impl.f_frame_rect_x1,
self->private_impl.f_height); self->private_impl.f_frame_rect_y1);
} }
// -------- func png.decoder.num_animation_loops // -------- func png.decoder.num_animation_loops
+4 -4
View File
@@ -1265,10 +1265,10 @@ pri func decoder.decode_pass?(src: base.io_reader, workbuf: slice base.u8) {
pub func decoder.frame_dirty_rect() base.rect_ie_u32 { pub func decoder.frame_dirty_rect() base.rect_ie_u32 {
return this.util.make_rect_ie_u32( return this.util.make_rect_ie_u32(
min_incl_x: 0, min_incl_x: this.frame_rect_x0,
min_incl_y: 0, min_incl_y: this.frame_rect_y0,
max_excl_x: this.width, max_excl_x: this.frame_rect_x1,
max_excl_y: this.height) max_excl_y: this.frame_rect_y1)
} }
pub func decoder.num_animation_loops() base.u32 { pub func decoder.num_animation_loops() base.u32 {