diff options
| author | Cameron Cawley | 2019-12-14 12:13:09 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2019-12-14 17:09:18 +0200 | 
| commit | c3c3137ab3a3d09c12eaa7140cb7ec760bdfe924 (patch) | |
| tree | acb4ba1b30107b2ee3b03094aa8d75b983948cb8 /backends/graphics | |
| parent | 97b4ee93f1fad5bcca7cbb5472c0138be9f607db (diff) | |
| download | scummvm-rg350-c3c3137ab3a3d09c12eaa7140cb7ec760bdfe924.tar.gz scummvm-rg350-c3c3137ab3a3d09c12eaa7140cb7ec760bdfe924.tar.bz2 scummvm-rg350-c3c3137ab3a3d09c12eaa7140cb7ec760bdfe924.zip  | |
BACKENDS: Move nextHigher2() into common/algorithm.h
Diffstat (limited to 'backends/graphics')
| -rw-r--r-- | backends/graphics/opengl/texture.cpp | 18 | 
1 files changed, 3 insertions, 15 deletions
diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp index 93480f7360..2b6f9ce0a1 100644 --- a/backends/graphics/opengl/texture.cpp +++ b/backends/graphics/opengl/texture.cpp @@ -26,25 +26,13 @@  #include "backends/graphics/opengl/pipelines/clut8.h"  #include "backends/graphics/opengl/framebuffer.h" +#include "common/algorithm.h"  #include "common/endian.h"  #include "common/rect.h"  #include "common/textconsole.h"  namespace OpenGL { -static GLuint nextHigher2(GLuint v) { -	if (v == 0) -		return 1; -	v--; -	v |= v >> 1; -	v |= v >> 2; -	v |= v >> 4; -	v |= v >> 8; -	v |= v >> 16; -	return ++v; -} - -  GLTexture::GLTexture(GLenum glIntFormat, GLenum glFormat, GLenum glType)      : _glIntFormat(glIntFormat), _glFormat(glFormat), _glType(glType),        _width(0), _height(0), _logicalWidth(0), _logicalHeight(0), @@ -107,8 +95,8 @@ void GLTexture::setSize(uint width, uint height) {  	const uint oldHeight = _height;  	if (!g_context.NPOTSupported) { -		_width  = nextHigher2(width); -		_height = nextHigher2(height); +		_width  = Common::nextHigher2(width); +		_height = Common::nextHigher2(height);  	} else {  		_width  = width;  		_height = height;  | 
