From 39c1a3d17946726b29d9cb138c83d8ed07905974 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sat, 30 Jun 2018 16:53:35 +1000 Subject: [PATCH] Remove the unused wuffs_base__image_buffer__loop --- cmd/wuffs-c/internal/cgen/base/base-public.h | 19 ------------------- cmd/wuffs-c/internal/cgen/data.go | 9 ++++----- gen/c/base.c | 19 ------------------- gen/c/std/adler32.c | 19 ------------------- gen/c/std/crc32.c | 19 ------------------- gen/c/std/deflate.c | 19 ------------------- gen/c/std/gif.c | 19 ------------------- gen/c/std/gzip.c | 19 ------------------- gen/c/std/lzw.c | 19 ------------------- gen/c/std/zlib.c | 19 ------------------- gen/h/std/adler32.h | 19 ------------------- gen/h/std/crc32.h | 19 ------------------- gen/h/std/deflate.h | 19 ------------------- gen/h/std/gif.h | 19 ------------------- gen/h/std/gzip.h | 19 ------------------- gen/h/std/lzw.h | 19 ------------------- gen/h/std/zlib.h | 19 ------------------- 17 files changed, 4 insertions(+), 309 deletions(-) diff --git a/cmd/wuffs-c/internal/cgen/base/base-public.h b/cmd/wuffs-c/internal/cgen/base/base-public.h index 68d6518b..7b35f6dd 100644 --- a/cmd/wuffs-c/internal/cgen/base/base-public.h +++ b/cmd/wuffs-c/internal/cgen/base/base-public.h @@ -1212,25 +1212,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/cmd/wuffs-c/internal/cgen/data.go b/cmd/wuffs-c/internal/cgen/data.go index 55269220..4447b1a8 100644 --- a/cmd/wuffs-c/internal/cgen/data.go +++ b/cmd/wuffs-c/internal/cgen/data.go @@ -88,11 +88,10 @@ const basePublicH = "" + "" + "// --------\n\ntypedef struct {\n // Do not access the private_impl's fields directly. There is no API/ABI\n // compatibility or safety guarantee if you do so.\n struct {\n wuffs_base__image_config config;\n uint32_t loop_count; // 0-based count of the current loop.\n wuffs_base__pixel_buffer pixbuf;\n // TODO: color spaces.\n wuffs_base__rect_ie_u32 dirty_rect;\n wuffs_base__flicks duration;\n bool blend;\n wuffs_base__animation_disposal disposal;\n bool palette_changed;\n uint8_t palette[1024];\n } private_impl;\n} wuffs_base__image_buffer;\n\nstatic inline wuffs_base__status wuffs_base__image_buffer__set_from_pixbuf(\n wuffs_base__image_buffer* b,\n wuffs_base__image_config config,\n wuffs_base__pixel_buffer pixbuf) {\n if (!b) {\n return WUFFS_BASE__ERROR_BAD_RECEIVER;\n }\n *b = ((wuffs_base__image_buffer){});\n b->private_impl.config = config;\n b->private_impl.pixbuf = pixbuf;\n return WUFFS_BASE__STATUS_OK;\n}\n\nstatic inline wuffs_base__status wuffs_base__image_buffer__set_from_" + "slice(\n wuffs_base__image_buffer* b,\n wuffs_base__image_config config,\n wuffs_base__slice_u8 pixbuf_memory) {\n if (!b) {\n return WUFFS_BASE__ERROR_BAD_RECEIVER;\n }\n *b = ((wuffs_base__image_buffer){});\n // TODO: don't assume 1 byte per pixel. Don't assume packed.\n uint64_t wh = ((uint64_t)config.private_impl.width) *\n ((uint64_t)config.private_impl.height);\n if (wh > pixbuf_memory.len) {\n return WUFFS_BASE__ERROR_BAD_ARGUMENT_LENGTH_TOO_SHORT;\n }\n b->private_impl.config = config;\n wuffs_base__table_u8* tab = &b->private_impl.pixbuf.planes[0];\n tab->ptr = pixbuf_memory.ptr;\n tab->width = config.private_impl.width;\n tab->height = config.private_impl.height;\n tab->stride = config.private_impl.width;\n return WUFFS_BASE__STATUS_OK;\n}\n\n// The palette argument is ignored unless its length is exactly 1024.\nstatic inline void wuffs_base__image_buffer__update(\n wuffs_base__image_buffer* b,\n wuffs_base__rect_ie_u32 dirty_rect,\n wuffs_base__flicks duration,\n bool bl" + - "end,\n wuffs_base__animation_disposal disposal,\n wuffs_base__slice_u8 palette) {\n if (!b) {\n return;\n }\n\n // Clip the dirty_rect to the image bounds.\n dirty_rect.max_excl_x = wuffs_base__u32__min(\n dirty_rect.max_excl_x, b->private_impl.config.private_impl.width);\n dirty_rect.max_excl_y = wuffs_base__u32__min(\n dirty_rect.max_excl_y, b->private_impl.config.private_impl.height);\n b->private_impl.dirty_rect = dirty_rect;\n\n b->private_impl.duration = duration;\n b->private_impl.blend = blend;\n b->private_impl.disposal = disposal;\n b->private_impl.palette_changed = palette.ptr && (palette.len == 1024);\n if (b->private_impl.palette_changed) {\n memmove(b->private_impl.palette, palette.ptr, 1024);\n }\n}\n\n// wuffs_base__image_buffer__loop returns whether the image decoder should loop\n// back to the beginning of the animation, assuming that we've reached the end\n// of the encoded stream. If so, it increments b's count of the animation loops\n// played so far.\nstatic inline bool wuffs_base" + - "__image_buffer__loop(wuffs_base__image_buffer* b) {\n if (!b) {\n return false;\n }\n uint32_t n = b->private_impl.config.private_impl.num_loops;\n if (n == 0) {\n return true;\n }\n if (b->private_impl.loop_count < n - 1) {\n b->private_impl.loop_count++;\n return true;\n }\n return false;\n}\n\n// wuffs_base__image_config returns the overall configuration for this frame.\nstatic inline wuffs_base__image_config* wuffs_base__image_buffer__image_config(\n wuffs_base__image_buffer* b) {\n return b ? &b->private_impl.config : NULL;\n}\n\nstatic inline wuffs_base__rect_ie_u32 wuffs_base__image_buffer__bounds(\n wuffs_base__image_buffer* b) {\n return b ? wuffs_base__image_config__bounds(&b->private_impl.config)\n : ((wuffs_base__rect_ie_u32){});\n}\n\nstatic inline uint32_t wuffs_base__image_buffer__width(\n wuffs_base__image_buffer* b) {\n return b ? wuffs_base__image_config__width(&b->private_impl.config) : 0;\n}\n\nstatic inline uint32_t wuffs_base__image_buffer__height(\n wuffs_base__image_buffer*" + - " b) {\n return b ? wuffs_base__image_config__height(&b->private_impl.config) : 0;\n}\n\n// wuffs_base__image_buffer__dirty_rect returns an upper bound for what part of\n// this frame's pixels differs from the previous frame.\nstatic inline wuffs_base__rect_ie_u32 wuffs_base__image_buffer__dirty_rect(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.dirty_rect : ((wuffs_base__rect_ie_u32){});\n}\n\n// wuffs_base__image_buffer__duration returns the amount of time to display\n// this frame. Zero means to display forever - a still (non-animated) image.\nstatic inline wuffs_base__flicks wuffs_base__image_buffer__duration(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.duration : 0;\n}\n\n// wuffs_base__image_buffer__blend returns, for a transparent image, whether to\n// blend this frame with the existing canvas.\n//\n// In Porter-Duff compositing operator terminology, false means \"src\" and true\n// means \"src over dst\".\nstatic inline bool wuffs_base__image_buffer__blend(\n wuffs_base__image_buffer" + - "* b) {\n return b && b->private_impl.blend;\n}\n\n// wuffs_base__image_buffer__disposal returns, for an animated image, how to\n// dispose of this frame after displaying it.\nstatic inline wuffs_base__animation_disposal wuffs_base__image_buffer__disposal(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.disposal : 0;\n}\n\n// wuffs_base__image_buffer__palette_changed returns whether this frame's\n// palette differs from the previous frame. It is conservative and may return\n// false positives (but never false negatives).\nstatic inline bool wuffs_base__image_buffer__palette_changed(\n wuffs_base__image_buffer* b) {\n return b && b->private_impl.palette_changed;\n}\n\n// wuffs_base__image_buffer__palette returns the palette that the pixel data\n// can index. The backing array is inside b and has length 1024.\nstatic inline wuffs_base__slice_u8 wuffs_base__image_buffer__palette(\n wuffs_base__image_buffer* b) {\n return b ? ((wuffs_base__slice_u8){.ptr = b->private_impl.palette,\n " + - " .len = 1024})\n : ((wuffs_base__slice_u8){});\n}\n\nstatic inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(\n wuffs_base__image_buffer* b,\n uint32_t p) {\n return (b && (p < WUFFS_BASE__PIXEL_FORMAT__NUM_PLANES_MAX))\n ? b->private_impl.pixbuf.planes[p]\n : ((wuffs_base__table_u8){});\n}\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#endif // WUFFS_INCLUDE_GUARD__BASE_PUBLIC\n" + + "end,\n wuffs_base__animation_disposal disposal,\n wuffs_base__slice_u8 palette) {\n if (!b) {\n return;\n }\n\n // Clip the dirty_rect to the image bounds.\n dirty_rect.max_excl_x = wuffs_base__u32__min(\n dirty_rect.max_excl_x, b->private_impl.config.private_impl.width);\n dirty_rect.max_excl_y = wuffs_base__u32__min(\n dirty_rect.max_excl_y, b->private_impl.config.private_impl.height);\n b->private_impl.dirty_rect = dirty_rect;\n\n b->private_impl.duration = duration;\n b->private_impl.blend = blend;\n b->private_impl.disposal = disposal;\n b->private_impl.palette_changed = palette.ptr && (palette.len == 1024);\n if (b->private_impl.palette_changed) {\n memmove(b->private_impl.palette, palette.ptr, 1024);\n }\n}\n\n// wuffs_base__image_config returns the overall configuration for this frame.\nstatic inline wuffs_base__image_config* wuffs_base__image_buffer__image_config(\n wuffs_base__image_buffer* b) {\n return b ? &b->private_impl.config : NULL;\n}\n\nstatic inline wuffs_base__rect_ie_u32 wuffs_b" + + "ase__image_buffer__bounds(\n wuffs_base__image_buffer* b) {\n return b ? wuffs_base__image_config__bounds(&b->private_impl.config)\n : ((wuffs_base__rect_ie_u32){});\n}\n\nstatic inline uint32_t wuffs_base__image_buffer__width(\n wuffs_base__image_buffer* b) {\n return b ? wuffs_base__image_config__width(&b->private_impl.config) : 0;\n}\n\nstatic inline uint32_t wuffs_base__image_buffer__height(\n wuffs_base__image_buffer* b) {\n return b ? wuffs_base__image_config__height(&b->private_impl.config) : 0;\n}\n\n// wuffs_base__image_buffer__dirty_rect returns an upper bound for what part of\n// this frame's pixels differs from the previous frame.\nstatic inline wuffs_base__rect_ie_u32 wuffs_base__image_buffer__dirty_rect(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.dirty_rect : ((wuffs_base__rect_ie_u32){});\n}\n\n// wuffs_base__image_buffer__duration returns the amount of time to display\n// this frame. Zero means to display forever - a still (non-animated) image.\nstatic inline wuffs_base__fl" + + "icks wuffs_base__image_buffer__duration(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.duration : 0;\n}\n\n// wuffs_base__image_buffer__blend returns, for a transparent image, whether to\n// blend this frame with the existing canvas.\n//\n// In Porter-Duff compositing operator terminology, false means \"src\" and true\n// means \"src over dst\".\nstatic inline bool wuffs_base__image_buffer__blend(\n wuffs_base__image_buffer* b) {\n return b && b->private_impl.blend;\n}\n\n// wuffs_base__image_buffer__disposal returns, for an animated image, how to\n// dispose of this frame after displaying it.\nstatic inline wuffs_base__animation_disposal wuffs_base__image_buffer__disposal(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.disposal : 0;\n}\n\n// wuffs_base__image_buffer__palette_changed returns whether this frame's\n// palette differs from the previous frame. It is conservative and may return\n// false positives (but never false negatives).\nstatic inline bool wuffs_base__image_buffer__palette_chan" + + "ged(\n wuffs_base__image_buffer* b) {\n return b && b->private_impl.palette_changed;\n}\n\n// wuffs_base__image_buffer__palette returns the palette that the pixel data\n// can index. The backing array is inside b and has length 1024.\nstatic inline wuffs_base__slice_u8 wuffs_base__image_buffer__palette(\n wuffs_base__image_buffer* b) {\n return b ? ((wuffs_base__slice_u8){.ptr = b->private_impl.palette,\n .len = 1024})\n : ((wuffs_base__slice_u8){});\n}\n\nstatic inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(\n wuffs_base__image_buffer* b,\n uint32_t p) {\n return (b && (p < WUFFS_BASE__PIXEL_FORMAT__NUM_PLANES_MAX))\n ? b->private_impl.pixbuf.planes[p]\n : ((wuffs_base__table_u8){});\n}\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#endif // WUFFS_INCLUDE_GUARD__BASE_PUBLIC\n" + "" const basePrivateH = "" + diff --git a/gen/c/base.c b/gen/c/base.c index e313fc27..5623d79e 100644 --- a/gen/c/base.c +++ b/gen/c/base.c @@ -1243,25 +1243,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/adler32.c b/gen/c/std/adler32.c index b194e38b..ff2b6ad3 100644 --- a/gen/c/std/adler32.c +++ b/gen/c/std/adler32.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/crc32.c b/gen/c/std/crc32.c index f4c900dd..ae347b9b 100644 --- a/gen/c/std/crc32.c +++ b/gen/c/std/crc32.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/deflate.c b/gen/c/std/deflate.c index 776c3cea..f68b237a 100644 --- a/gen/c/std/deflate.c +++ b/gen/c/std/deflate.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/gif.c b/gen/c/std/gif.c index 231faf55..94589425 100644 --- a/gen/c/std/gif.c +++ b/gen/c/std/gif.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/gzip.c b/gen/c/std/gzip.c index f0ecad26..9c2efdc9 100644 --- a/gen/c/std/gzip.c +++ b/gen/c/std/gzip.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/lzw.c b/gen/c/std/lzw.c index 9cac40ab..a0e98f4e 100644 --- a/gen/c/std/lzw.c +++ b/gen/c/std/lzw.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/c/std/zlib.c b/gen/c/std/zlib.c index 6622cf49..ee6a59b0 100644 --- a/gen/c/std/zlib.c +++ b/gen/c/std/zlib.c @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/adler32.h b/gen/h/std/adler32.h index 4f4f0a7a..4da7edc8 100644 --- a/gen/h/std/adler32.h +++ b/gen/h/std/adler32.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/crc32.h b/gen/h/std/crc32.h index 0b6b9613..b9b34951 100644 --- a/gen/h/std/crc32.h +++ b/gen/h/std/crc32.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/deflate.h b/gen/h/std/deflate.h index 6c3b1559..3d0bb93f 100644 --- a/gen/h/std/deflate.h +++ b/gen/h/std/deflate.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/gif.h b/gen/h/std/gif.h index 3b7ab4d3..3698a5b2 100644 --- a/gen/h/std/gif.h +++ b/gen/h/std/gif.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/gzip.h b/gen/h/std/gzip.h index 49432b7c..d113cb83 100644 --- a/gen/h/std/gzip.h +++ b/gen/h/std/gzip.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/lzw.h b/gen/h/std/lzw.h index 70763220..5b526b87 100644 --- a/gen/h/std/lzw.h +++ b/gen/h/std/lzw.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) { diff --git a/gen/h/std/zlib.h b/gen/h/std/zlib.h index 3927f63d..277b1936 100644 --- a/gen/h/std/zlib.h +++ b/gen/h/std/zlib.h @@ -1232,25 +1232,6 @@ static inline void wuffs_base__image_buffer__update( } } -// wuffs_base__image_buffer__loop returns whether the image decoder should loop -// back to the beginning of the animation, assuming that we've reached the end -// of the encoded stream. If so, it increments b's count of the animation loops -// played so far. -static inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) { - if (!b) { - return false; - } - uint32_t n = b->private_impl.config.private_impl.num_loops; - if (n == 0) { - return true; - } - if (b->private_impl.loop_count < n - 1) { - b->private_impl.loop_count++; - return true; - } - return false; -} - // wuffs_base__image_config returns the overall configuration for this frame. static inline wuffs_base__image_config* wuffs_base__image_buffer__image_config( wuffs_base__image_buffer* b) {