diff options
| author | Rémi Verschelde | 2017-08-18 08:12:56 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-18 08:12:56 +0200 |
| commit | 1a92906b681735a5a2acfd98e3d6a4c75a7f6115 (patch) | |
| tree | f01757ba9a3b618df7da54b0698134b1a9f03e3f /core/image.cpp | |
| parent | 3a4ff3402dedab5f30b0f97aeadec6cf61f29a40 (diff) | |
| parent | eab850524ead092ed9fe22e57955e59eae373b79 (diff) | |
| download | godot-1a92906b681735a5a2acfd98e3d6a4c75a7f6115.tar.gz godot-1a92906b681735a5a2acfd98e3d6a4c75a7f6115.tar.zst godot-1a92906b681735a5a2acfd98e3d6a4c75a7f6115.zip | |
Diffstat (limited to 'core/image.cpp')
| -rw-r--r-- | core/image.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/image.cpp b/core/image.cpp index 2db9cb157..a4864458b 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -676,8 +676,8 @@ void Image::resize_to_po2(bool p_square) { ERR_FAIL(); } - int w = nearest_power_of_2(width); - int h = nearest_power_of_2(height); + int w = next_power_of_2(width); + int h = next_power_of_2(height); if (w == width && h == height) { @@ -1060,7 +1060,7 @@ Error Image::generate_mipmaps() { PoolVector<uint8_t>::Write wp = data.write(); - if (nearest_power_of_2(width) == uint32_t(width) && nearest_power_of_2(height) == uint32_t(height)) { + if (next_power_of_2(width) == uint32_t(width) && next_power_of_2(height) == uint32_t(height)) { //use fast code for powers of 2 int prev_ofs = 0; int prev_h = height; |
