aboutsummaryrefslogtreecommitdiff
path: root/core/image.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-08-18 08:12:56 +0200
committerGitHub2017-08-18 08:12:56 +0200
commit1a92906b681735a5a2acfd98e3d6a4c75a7f6115 (patch)
treef01757ba9a3b618df7da54b0698134b1a9f03e3f /core/image.cpp
parent3a4ff3402dedab5f30b0f97aeadec6cf61f29a40 (diff)
parenteab850524ead092ed9fe22e57955e59eae373b79 (diff)
downloadgodot-1a92906b681735a5a2acfd98e3d6a4c75a7f6115.tar.gz
godot-1a92906b681735a5a2acfd98e3d6a4c75a7f6115.tar.zst
godot-1a92906b681735a5a2acfd98e3d6a4c75a7f6115.zip
Diffstat (limited to 'core/image.cpp')
-rw-r--r--core/image.cpp6
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;