From: Joogab Yun Date: Mon, 31 Jul 2017 02:16:04 +0000 (+0900) Subject: [evas_gl_thread] remove build warning message X-Git-Tag: accepted/tizen/4.0/unified/20170816.011633~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d6133d705b6d1ab7f079b211a6fa2204ffef76f;p=platform%2Fupstream%2Fefl.git [evas_gl_thread] remove build warning message Change-Id: Idae973352f03ad12f5927f9d4047d14181abf7c9 --- diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_gl.c b/src/modules/evas/engines/gl_common/evas_gl_thread_gl.c index 2ef54fb..f83d363 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_gl.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_gl.c @@ -226,14 +226,12 @@ get_size(GLenum format, GLenum type, GLsizei width, GLsizei height) } } -// if (csize >= a) -// k = comp * l; -// else /* csize < a */ -// k = (a / csize) * ceil( (csize * comp * l) / a); -// -// return k * height; - - return csize * comp; + if (csize >= a) + k = comp * l; + else /* csize < a */ + k = (a / csize) * ceil( (csize * comp * l) / a); + + return k * height * csize; } #define GLPIXELSTOREI_VARIABLE_DECLARE \ @@ -288,9 +286,8 @@ get_size(GLenum format, GLenum type, GLsizei width, GLsizei height) if (_cache_glBindBuffer_pixel_unpack_buffer_idx == 0) \ { \ /* 2. check memory size */ \ - int size = get_size(format, type, width + (border *2), height + (border *2)); \ - int copy_size = (width + (border * 2)) * (height + (border * 2)) * size; \ - if (size < 0 || copy_size < 0 || (unsigned int)copy_size > _mp_texture_memory_size) \ + int copy_size = get_size(format, type, width + (border *2), height + (border *2)); \ + if (copy_size < 0 || (unsigned int)copy_size > _mp_texture_memory_size) \ { \ thread_mode = EVAS_GL_THREAD_MODE_FINISH; \ goto finish; \ @@ -332,9 +329,8 @@ get_size(GLenum format, GLenum type, GLsizei width, GLsizei height) if (_cache_glBindBuffer_pixel_unpack_buffer_idx == 0) \ { \ /* 2. check memory size */ \ - int size = get_size(format, type, width, height); \ - int copy_size = width * height * size; \ - if (size < 0 || copy_size < 0 || (unsigned int)copy_size > _mp_texture_memory_size) \ + int copy_size = get_size(format, type, width, height); \ + if (copy_size < 0 || (unsigned int)copy_size > _mp_texture_memory_size) \ { \ thread_mode = EVAS_GL_THREAD_MODE_FINISH; \ goto finish; \