diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /modules/squish | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'modules/squish')
-rw-r--r-- | modules/squish/image_compress_squish.cpp | 9 | ||||
-rw-r--r-- | modules/squish/register_types.cpp | 1 |
2 files changed, 0 insertions, 10 deletions
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index bb77f68590..a19f3158c4 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -78,7 +78,6 @@ void image_decompress_squish(Image *p_image) { } void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) { - if (p_image->get_format() >= Image::FORMAT_DXT1) return; //do not compress, already compressed @@ -86,7 +85,6 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha int h = p_image->get_height(); if (p_image->get_format() <= Image::FORMAT_RGBA8) { - int squish_comp = squish::kColourRangeFit; if (p_lossy_quality > 0.85) @@ -100,32 +98,26 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha switch (p_channels) { case Image::USED_CHANNELS_L: { - target_format = Image::FORMAT_DXT1; squish_comp |= squish::kDxt1; } break; case Image::USED_CHANNELS_LA: { - target_format = Image::FORMAT_DXT5; squish_comp |= squish::kDxt5; } break; case Image::USED_CHANNELS_R: { - target_format = Image::FORMAT_RGTC_R; squish_comp |= squish::kBc4; } break; case Image::USED_CHANNELS_RG: { - target_format = Image::FORMAT_RGTC_RG; squish_comp |= squish::kBc5; } break; case Image::USED_CHANNELS_RGB: { - target_format = Image::FORMAT_DXT1; squish_comp |= squish::kDxt1; } break; case Image::USED_CHANNELS_RGBA: { - //TODO, should convert both, then measure which one does a better job target_format = Image::FORMAT_DXT5; squish_comp |= squish::kDxt5; @@ -149,7 +141,6 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha int dst_ofs = 0; for (int i = 0; i <= mm_count; i++) { - int bw = w % 4 != 0 ? w + (4 - w % 4) : w; int bh = h % 4 != 0 ? h + (4 - h % 4) : h; diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp index 2a0cf82b56..ad28aff058 100644 --- a/modules/squish/register_types.cpp +++ b/modules/squish/register_types.cpp @@ -32,7 +32,6 @@ #include "image_compress_squish.h" void register_squish_types() { - Image::set_compress_bc_func(image_compress_squish); Image::_image_decompress_bc = image_decompress_squish; } |