[evas_gl_thread] remove build warning message 00/141300/2
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 31 Jul 2017 02:16:04 +0000 (11:16 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 31 Jul 2017 02:41:22 +0000 (02:41 +0000)
Change-Id: Idae973352f03ad12f5927f9d4047d14181abf7c9

src/modules/evas/engines/gl_common/evas_gl_thread_gl.c

index 2ef54fb..f83d363 100644 (file)
@@ -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; \