Chromium Code Reviews| Index: gpu/command_buffer/common/gles2_cmd_utils.cc |
| diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc |
| index 0011053ad2d63e0892e809baf6c74e1feb57d83b..713497f9ed3d362983b7be8c8fb075f5dba9df8b 100644 |
| --- a/gpu/command_buffer/common/gles2_cmd_utils.cc |
| +++ b/gpu/command_buffer/common/gles2_cmd_utils.cc |
| @@ -795,7 +795,7 @@ uint32_t GLES2Util::GetElementCountForUniformType(int type) { |
| } |
| } |
| -size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32_t type) { |
| +size_t GLES2Util::GetGLTypeSizeForBuffers(uint32_t type) { |
| switch (type) { |
| case GL_BYTE: |
| return sizeof(GLbyte); // NOLINT |
| @@ -824,6 +824,13 @@ size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32_t type) { |
| } |
| } |
| +size_t GLES2Util::GetGroupSizeForBufferType(uint32_t count, uint32_t type) { |
| + size_t type_size = GetGLTypeSizeForBuffers(type); |
| + // For packed types, group size equals to the type size. |
| + if (type == GL_INT_2_10_10_10_REV || type == GL_UNSIGNED_INT_2_10_10_10_REV) |
| + return type_size; |
|
Zhenyao Mo
2016/02/26 04:24:29
nit: please DCHECK_EQ(4u, count) here.
yunchao
2016/02/26 06:45:26
Done.
|
| + return type_size * count; |
| +} |
| size_t GLES2Util::GetComponentCountForGLTransformType(uint32_t type) { |
| switch (type) { |
| case GL_TRANSLATE_X_CHROMIUM: |