diff --git a/cogl/cogl-texture-2d-sliced.c b/cogl/cogl-texture-2d-sliced.c index 36292f8c9..adbbb144e 100644 --- a/cogl/cogl-texture-2d-sliced.c +++ b/cogl/cogl-texture-2d-sliced.c @@ -783,8 +783,8 @@ _cogl_texture_2d_sliced_slices_create (CoglTexture2DSliced *tex_2ds, } else { - max_width = cogl_util_next_p2 (width); - max_height = cogl_util_next_p2 (height); + max_width = _cogl_util_next_p2 (width); + max_height = _cogl_util_next_p2 (height); tex_2ds->gl_target = GL_TEXTURE_2D; slices_for_size = _cogl_pot_slices_for_size; } diff --git a/cogl/cogl-util.c b/cogl/cogl-util.c index 369017b8c..f6d3709f2 100644 --- a/cogl/cogl-util.c +++ b/cogl/cogl-util.c @@ -40,16 +40,17 @@ #include "cogl-handle.h" #include "cogl-util.h" -/** +/* * cogl_util_next_p2: - * @a: Value to get the next power + * @a: Value to get the next power of two * - * Calculates the next power greater than @a. + * Calculates the next power of two greater than or equal to @a. * - * Return value: The next power after @a. + * Return value: @a if @a is already a power of two, otherwise returns + * the next nearest power of two. */ int -cogl_util_next_p2 (int a) +_cogl_util_next_p2 (int a) { int rval = 1; diff --git a/cogl/cogl-util.h b/cogl/cogl-util.h index f63863a42..64ba8ffcf 100644 --- a/cogl/cogl-util.h +++ b/cogl/cogl-util.h @@ -28,7 +28,7 @@ #include int -cogl_util_next_p2 (int a); +_cogl_util_next_p2 (int a); /* The signbit macro is defined by ISO C99 so it should be available, however if it's not we can fallback to an evil hack */