summaryrefslogtreecommitdiff
path: root/modules/squish
diff options
context:
space:
mode:
Diffstat (limited to 'modules/squish')
-rw-r--r--modules/squish/image_compress_squish.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index 2f680fd3d0..bb77f68590 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -37,13 +37,13 @@ void image_decompress_squish(Image *p_image) {
int h = p_image->get_height();
Image::Format target_format = Image::FORMAT_RGBA8;
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
int mm_count = p_image->get_mipmap_count();
data.resize(target_size);
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
- PoolVector<uint8_t>::Write wb = data.write();
+ const uint8_t *rb = p_image->get_data().ptr();
+ uint8_t *wb = data.ptrw();
int squish_flags = Image::FORMAT_MAX;
if (p_image->get_format() == Image::FORMAT_DXT1) {
@@ -137,14 +137,14 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
}
}
- PoolVector<uint8_t> data;
+ Vector<uint8_t> data;
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
int mm_count = p_image->has_mipmaps() ? Image::get_image_required_mipmaps(w, h, target_format) : 0;
data.resize(target_size);
int shift = Image::get_format_pixel_rshift(target_format);
- PoolVector<uint8_t>::Read rb = p_image->get_data().read();
- PoolVector<uint8_t>::Write wb = data.write();
+ const uint8_t *rb = p_image->get_data().ptr();
+ uint8_t *wb = data.ptrw();
int dst_ofs = 0;
@@ -160,9 +160,6 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
h = MAX(h / 2, 1);
}
- rb.release();
- wb.release();
-
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
}
}