mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Rename some initialize methods to prepare or set
This commit is contained in:
1 parent
ecccafab09
commit
65c2f4971f
8 files changed
+142
-144
No files matched your search
@@ -99,11 +99,11 @@ wuffs_base__pixel_swizzler__swap_rgbx_bgrx(wuffs_base__slice_u8 dst,
|
||||
}
|
||||
|
||||
void //
|
||||
wuffs_base__pixel_swizzler__initialize(wuffs_base__pixel_swizzler* p,
|
||||
wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette) {
|
||||
wuffs_base__pixel_swizzler__prepare(wuffs_base__pixel_swizzler* p,
|
||||
wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette) {
|
||||
if (!p) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -331,10 +331,10 @@ typedef struct {
|
||||
} private_impl;
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline void initialize(wuffs_base__pixel_format pixfmt,
|
||||
wuffs_base__pixel_subsampling pixsub,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
inline void set(wuffs_base__pixel_format pixfmt,
|
||||
wuffs_base__pixel_subsampling pixsub,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
inline void invalidate();
|
||||
inline bool is_valid();
|
||||
inline wuffs_base__pixel_format pixel_format();
|
||||
@@ -349,11 +349,11 @@ typedef struct {
|
||||
|
||||
// TODO: Should this function return bool? An error type?
|
||||
static inline void //
|
||||
wuffs_base__pixel_config__initialize(wuffs_base__pixel_config* c,
|
||||
wuffs_base__pixel_format pixfmt,
|
||||
wuffs_base__pixel_subsampling pixsub,
|
||||
uint32_t width,
|
||||
uint32_t height) {
|
||||
wuffs_base__pixel_config__set(wuffs_base__pixel_config* c,
|
||||
wuffs_base__pixel_format pixfmt,
|
||||
wuffs_base__pixel_subsampling pixsub,
|
||||
uint32_t width,
|
||||
uint32_t height) {
|
||||
if (!c) {
|
||||
return;
|
||||
}
|
||||
@@ -454,11 +454,11 @@ wuffs_base__pixel_config__pixbuf_len(wuffs_base__pixel_config* c) {
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void //
|
||||
wuffs_base__pixel_config::initialize(wuffs_base__pixel_format pixfmt,
|
||||
wuffs_base__pixel_subsampling pixsub,
|
||||
uint32_t width,
|
||||
uint32_t height) {
|
||||
wuffs_base__pixel_config__initialize(this, pixfmt, pixsub, width, height);
|
||||
wuffs_base__pixel_config::set(wuffs_base__pixel_format pixfmt,
|
||||
wuffs_base__pixel_subsampling pixsub,
|
||||
uint32_t width,
|
||||
uint32_t height) {
|
||||
wuffs_base__pixel_config__set(this, pixfmt, pixsub, width, height);
|
||||
}
|
||||
|
||||
inline void //
|
||||
@@ -516,12 +516,12 @@ typedef struct {
|
||||
} private_impl;
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline void initialize(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);
|
||||
inline void 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);
|
||||
inline void invalidate();
|
||||
inline bool is_valid();
|
||||
inline uint64_t first_frame_io_position();
|
||||
@@ -532,13 +532,13 @@ typedef struct {
|
||||
|
||||
// TODO: Should this function return bool? An error type?
|
||||
static inline void //
|
||||
wuffs_base__image_config__initialize(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__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;
|
||||
}
|
||||
@@ -579,15 +579,14 @@ wuffs_base__image_config__first_frame_is_opaque(wuffs_base__image_config* c) {
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void //
|
||||
wuffs_base__image_config::initialize(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__initialize(this, pixfmt, pixsub, width, height,
|
||||
first_frame_io_position,
|
||||
first_frame_is_opaque);
|
||||
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);
|
||||
}
|
||||
|
||||
inline void //
|
||||
@@ -983,10 +982,10 @@ typedef struct {
|
||||
} private_impl;
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline void initialize(wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette);
|
||||
inline void prepare(wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette);
|
||||
inline uint64_t swizzle_packed(wuffs_base__slice_u8 dst,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__slice_u8 src);
|
||||
@@ -994,14 +993,14 @@ typedef struct {
|
||||
|
||||
} wuffs_base__pixel_swizzler;
|
||||
|
||||
// TODO: should initialize (both the C and C++ methods) return a status?
|
||||
// TODO: should prepare (both the C and C++ methods) return a status?
|
||||
|
||||
void //
|
||||
wuffs_base__pixel_swizzler__initialize(wuffs_base__pixel_swizzler* p,
|
||||
wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette);
|
||||
wuffs_base__pixel_swizzler__prepare(wuffs_base__pixel_swizzler* p,
|
||||
wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette);
|
||||
|
||||
uint64_t //
|
||||
wuffs_base__pixel_swizzler__swizzle_packed(wuffs_base__pixel_swizzler* p,
|
||||
@@ -1012,12 +1011,12 @@ wuffs_base__pixel_swizzler__swizzle_packed(wuffs_base__pixel_swizzler* p,
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void //
|
||||
wuffs_base__pixel_swizzler::initialize(wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette) {
|
||||
wuffs_base__pixel_swizzler__initialize(this, dst_format, dst_palette,
|
||||
src_format, src_palette);
|
||||
wuffs_base__pixel_swizzler::prepare(wuffs_base__pixel_format dst_format,
|
||||
wuffs_base__slice_u8 dst_palette,
|
||||
wuffs_base__pixel_format src_format,
|
||||
wuffs_base__slice_u8 src_palette) {
|
||||
wuffs_base__pixel_swizzler__prepare(this, dst_format, dst_palette, src_format,
|
||||
src_palette);
|
||||
}
|
||||
|
||||
uint64_t //
|
||||
|
||||
Reference in new issue
Block a user