| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 // Return the element's number of bytes. | 121 // Return the element's number of bytes. |
| 122 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat). | 122 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat). |
| 123 static uint32_t GetElementSizeForUniformType(int type); | 123 static uint32_t GetElementSizeForUniformType(int type); |
| 124 // Return the number of elements. | 124 // Return the number of elements. |
| 125 // For example, GL_FLOAT_MAT3 returns 9. | 125 // For example, GL_FLOAT_MAT3 returns 9. |
| 126 static uint32_t GetElementCountForUniformType(int type); | 126 static uint32_t GetElementCountForUniformType(int type); |
| 127 | 127 |
| 128 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); | 128 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); |
| 129 | 129 |
| 130 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); |
| 131 |
| 130 static uint32_t GLErrorToErrorBit(uint32_t gl_error); | 132 static uint32_t GLErrorToErrorBit(uint32_t gl_error); |
| 131 | 133 |
| 132 static uint32_t GLErrorBitToGLError(uint32_t error_bit); | 134 static uint32_t GLErrorBitToGLError(uint32_t error_bit); |
| 133 | 135 |
| 134 static uint32_t IndexToGLFaceTarget(int index); | 136 static uint32_t IndexToGLFaceTarget(int index); |
| 135 | 137 |
| 136 static size_t GLTargetToFaceIndex(uint32_t target); | 138 static size_t GLTargetToFaceIndex(uint32_t target); |
| 137 | 139 |
| 138 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); | 140 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); |
| 139 | 141 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 bool lose_context_when_out_of_memory; | 220 bool lose_context_when_out_of_memory; |
| 219 // 0 if not a WebGL context. | 221 // 0 if not a WebGL context. |
| 220 unsigned webgl_version; | 222 unsigned webgl_version; |
| 221 }; | 223 }; |
| 222 | 224 |
| 223 } // namespace gles2 | 225 } // namespace gles2 |
| 224 } // namespace gpu | 226 } // namespace gpu |
| 225 | 227 |
| 226 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 228 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 227 | 229 |
| OLD | NEW |