Remove image_config.background_color

This commit is contained in:
Nigel Tao committed 2019-06-01 09:07:19 +10:00
1 parent ba3db0d7e5
commit abaab57cfd
5 files changed
+38 -82

No files matched your search

+16 -38
View File
@@ -2068,7 +2068,6 @@ typedef struct {
struct {
uint64_t first_frame_io_position;
bool first_frame_is_opaque;
wuffs_base__color_u32_argb_premul background_color;
} private_impl;
#ifdef __cplusplus
@@ -2077,13 +2076,11 @@ typedef struct {
uint32_t width,
uint32_t height,
uint64_t first_frame_io_position,
bool first_frame_is_opaque,
wuffs_base__color_u32_argb_premul background_color);
bool first_frame_is_opaque);
inline void invalidate();
inline bool is_valid() const;
inline uint64_t first_frame_io_position() const;
inline bool first_frame_is_opaque() const;
inline wuffs_base__color_u32_argb_premul background_color() const;
#endif // __cplusplus
} wuffs_base__image_config;
@@ -2099,15 +2096,13 @@ wuffs_base__null_image_config() {
// TODO: Should this function return bool? An error type?
static inline void //
wuffs_base__image_config__set(
wuffs_base__image_config* c,
wuffs_base__pixel_format pixfmt,
wuffs_base__pixel_subsampling pixsub,
uint32_t width,
uint32_t height,
uint64_t first_frame_io_position,
bool first_frame_is_opaque,
wuffs_base__color_u32_argb_premul background_color) {
wuffs_base__image_config__set(wuffs_base__image_config* c,
wuffs_base__pixel_format pixfmt,
wuffs_base__pixel_subsampling pixsub,
uint32_t width,
uint32_t height,
uint64_t first_frame_io_position,
bool first_frame_is_opaque) {
if (!c) {
return;
}
@@ -2118,7 +2113,6 @@ wuffs_base__image_config__set(
c->pixcfg.private_impl.height = height;
c->private_impl.first_frame_io_position = first_frame_io_position;
c->private_impl.first_frame_is_opaque = first_frame_is_opaque;
c->private_impl.background_color = background_color;
return;
}
@@ -2128,7 +2122,6 @@ wuffs_base__image_config__set(
c->pixcfg.private_impl.height = 0;
c->private_impl.first_frame_io_position = 0;
c->private_impl.first_frame_is_opaque = 0;
c->private_impl.background_color = 0;
}
static inline void //
@@ -2140,7 +2133,6 @@ wuffs_base__image_config__invalidate(wuffs_base__image_config* c) {
c->pixcfg.private_impl.height = 0;
c->private_impl.first_frame_io_position = 0;
c->private_impl.first_frame_is_opaque = 0;
c->private_impl.background_color = 0;
}
}
@@ -2161,25 +2153,17 @@ wuffs_base__image_config__first_frame_is_opaque(
return c ? c->private_impl.first_frame_is_opaque : false;
}
static inline wuffs_base__color_u32_argb_premul //
wuffs_base__image_config__background_color(const wuffs_base__image_config* c) {
return c ? c->private_impl.background_color : 0;
}
#ifdef __cplusplus
inline void //
wuffs_base__image_config::set(
wuffs_base__pixel_format pixfmt,
wuffs_base__pixel_subsampling pixsub,
uint32_t width,
uint32_t height,
uint64_t first_frame_io_position,
bool first_frame_is_opaque,
wuffs_base__color_u32_argb_premul background_color) {
wuffs_base__image_config::set(wuffs_base__pixel_format pixfmt,
wuffs_base__pixel_subsampling pixsub,
uint32_t width,
uint32_t height,
uint64_t first_frame_io_position,
bool first_frame_is_opaque) {
wuffs_base__image_config__set(this, pixfmt, pixsub, width, height,
first_frame_io_position, first_frame_is_opaque,
background_color);
first_frame_io_position, first_frame_is_opaque);
}
inline void //
@@ -2202,11 +2186,6 @@ wuffs_base__image_config::first_frame_is_opaque() const {
return wuffs_base__image_config__first_frame_is_opaque(this);
}
inline wuffs_base__color_u32_argb_premul //
wuffs_base__image_config::background_color() const {
return wuffs_base__image_config__background_color(this);
}
#endif // __cplusplus
// --------
@@ -8869,8 +8848,7 @@ wuffs_gif__decoder__decode_image_config(wuffs_gif__decoder* self,
wuffs_base__image_config__set(
a_dst, 1191444488, 0, self->private_impl.f_width,
self->private_impl.f_height,
self->private_impl.f_frame_config_io_position, v_ffio,
self->private_impl.f_background_color_u32_argb_premul);
self->private_impl.f_frame_config_io_position, v_ffio);
}
self->private_impl.f_call_sequence = 3;