OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file is here so other GLES2 related files can have a common set of | 5 // This file is here so other GLES2 related files can have a common set of |
6 // includes where appropriate. | 6 // includes where appropriate. |
7 | 7 |
8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 static size_t RenderbufferBytesPerPixel(int format); | 149 static size_t RenderbufferBytesPerPixel(int format); |
150 | 150 |
151 // Return the element's number of bytes. | 151 // Return the element's number of bytes. |
152 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat). | 152 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat). |
153 static uint32_t GetElementSizeForUniformType(int type); | 153 static uint32_t GetElementSizeForUniformType(int type); |
154 // Return the number of elements. | 154 // Return the number of elements. |
155 // For example, GL_FLOAT_MAT3 returns 9. | 155 // For example, GL_FLOAT_MAT3 returns 9. |
156 static uint32_t GetElementCountForUniformType(int type); | 156 static uint32_t GetElementCountForUniformType(int type); |
157 | 157 |
| 158 static size_t GetGLTypeSizeForTextures(uint32_t type); |
| 159 |
158 static size_t GetGLTypeSizeForBuffers(uint32_t type); | 160 static size_t GetGLTypeSizeForBuffers(uint32_t type); |
159 | 161 |
160 static size_t GetGroupSizeForBufferType(uint32_t count, uint32_t type); | 162 static size_t GetGroupSizeForBufferType(uint32_t count, uint32_t type); |
161 | 163 |
162 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); | 164 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); |
163 | 165 |
164 static uint32_t GLErrorToErrorBit(uint32_t gl_error); | 166 static uint32_t GLErrorToErrorBit(uint32_t gl_error); |
165 | 167 |
166 static size_t GetComponentCountForGLTransformType(uint32_t type); | 168 static size_t GetComponentCountForGLTransformType(uint32_t type); |
167 static size_t GetGLTypeSizeForGLPathNameType(uint32_t type); | 169 static size_t GetGLTypeSizeForGLPathNameType(uint32_t type); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 bool fail_if_major_perf_caveat; | 291 bool fail_if_major_perf_caveat; |
290 bool lose_context_when_out_of_memory; | 292 bool lose_context_when_out_of_memory; |
291 ContextType context_type; | 293 ContextType context_type; |
292 }; | 294 }; |
293 | 295 |
294 } // namespace gles2 | 296 } // namespace gles2 |
295 } // namespace gpu | 297 } // namespace gpu |
296 | 298 |
297 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 299 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
298 | 300 |
OLD | NEW |