Remove frame_config.palette_changed

This commit is contained in:
Nigel Tao committed 2018-08-26 17:22:29 +10:00
1 parent 75195af7db
commit 132b54378c
5 files changed
+18 -59

No files matched your search

+5 -25
View File
@@ -595,7 +595,6 @@ typedef struct {
uint64_t io_position;
wuffs_base__animation_blend blend;
wuffs_base__animation_disposal disposal;
bool palette_changed;
} private_impl;
#ifdef __cplusplus
@@ -604,8 +603,7 @@ typedef struct {
uint64_t index,
uint64_t io_position,
wuffs_base__animation_blend blend,
wuffs_base__animation_disposal disposal,
bool palette_changed);
wuffs_base__animation_disposal disposal);
inline wuffs_base__rect_ie_u32 bounds();
inline uint32_t width();
inline uint32_t height();
@@ -614,7 +612,6 @@ typedef struct {
inline uint64_t io_position();
inline wuffs_base__animation_blend blend();
inline wuffs_base__animation_disposal disposal();
inline bool palette_changed();
#endif // __cplusplus
} wuffs_base__frame_config;
@@ -626,8 +623,7 @@ wuffs_base__frame_config__update(wuffs_base__frame_config* c,
uint64_t index,
uint64_t io_position,
wuffs_base__animation_blend blend,
wuffs_base__animation_disposal disposal,
bool palette_changed) {
wuffs_base__animation_disposal disposal) {
if (!c) {
return;
}
@@ -638,7 +634,6 @@ wuffs_base__frame_config__update(wuffs_base__frame_config* c,
c->private_impl.io_position = io_position;
c->private_impl.blend = blend;
c->private_impl.disposal = disposal;
c->private_impl.palette_changed = palette_changed;
}
static inline wuffs_base__rect_ie_u32 //
@@ -691,14 +686,6 @@ wuffs_base__frame_config__disposal(wuffs_base__frame_config* c) {
return c ? c->private_impl.disposal : 0;
}
// wuffs_base__frame_config__palette_changed returns whether this frame's
// palette differs from the previous frame. It is conservative and may return
// false positives (but never false negatives).
static inline bool //
wuffs_base__frame_config__palette_changed(wuffs_base__frame_config* c) {
return c && c->private_impl.palette_changed;
}
#ifdef __cplusplus
inline void //
@@ -707,11 +694,9 @@ wuffs_base__frame_config::update(wuffs_base__rect_ie_u32 bounds,
uint64_t index,
uint64_t io_position,
wuffs_base__animation_blend blend,
wuffs_base__animation_disposal disposal,
bool palette_changed) {
wuffs_base__frame_config__update(this, bounds, duration, index,
io_position, blend, disposal,
palette_changed);
wuffs_base__animation_disposal disposal) {
wuffs_base__frame_config__update(this, bounds, duration, index, io_position,
blend, disposal);
}
inline wuffs_base__rect_ie_u32 //
@@ -754,11 +739,6 @@ wuffs_base__frame_config::disposal() {
return wuffs_base__frame_config__disposal(this);
}
inline bool //
wuffs_base__frame_config::palette_changed() {
return wuffs_base__frame_config__palette_changed(this);
}
#endif // __cplusplus
// --------