remove switch rgba
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
c5922f891f
commit
96ed6df4a9
4 changed files with 0 additions and 38 deletions
|
|
@ -39,21 +39,6 @@ G_DEFINE_TYPE(TextureRgba, texture_rgba,
|
|||
(G_TYPE_CHECK_INSTANCE_CAST((obj), texture_rgba_get_type(), \
|
||||
TextureRgba))
|
||||
|
||||
static inline void switch_rgba(uint8_t* pixels, int len, int height) {
|
||||
uint8_t temp;
|
||||
int byes_per_row = len / height;
|
||||
int width = byes_per_row >> 2;
|
||||
for (int i = 0; i < height; ++i) {
|
||||
int row_idx_base = i * byes_per_row;
|
||||
for (int k = 0; k < width; ++k) {
|
||||
int idx = row_idx_base + k * 4;
|
||||
temp = pixels[idx];
|
||||
pixels[idx] = pixels[idx + 2];
|
||||
pixels[idx + 2] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void texture_rgba_terminate(TextureRgba* self) {
|
||||
g_mutex_lock(&self->mutex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue