| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); | 130 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); |
| 131 | 131 |
| 132 static uint32_t GLErrorToErrorBit(uint32_t gl_error); | 132 static uint32_t GLErrorToErrorBit(uint32_t gl_error); |
| 133 | 133 |
| 134 static uint32_t GLErrorBitToGLError(uint32_t error_bit); | 134 static uint32_t GLErrorBitToGLError(uint32_t error_bit); |
| 135 | 135 |
| 136 static uint32_t IndexToGLFaceTarget(int index); | 136 static uint32_t IndexToGLFaceTarget(int index); |
| 137 | 137 |
| 138 static size_t GLTargetToFaceIndex(uint32_t target); | 138 static size_t GLTargetToFaceIndex(uint32_t target); |
| 139 | 139 |
| 140 static uint32_t GLTextureTargetToBindingTarget(uint32_t textarget); |
| 141 |
| 140 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); | 142 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); |
| 141 | 143 |
| 142 static uint32_t GetPreferredGLReadPixelsType( | 144 static uint32_t GetPreferredGLReadPixelsType( |
| 143 uint32_t internal_format, uint32_t texture_type); | 145 uint32_t internal_format, uint32_t texture_type); |
| 144 | 146 |
| 145 // Returns a bitmask for the channels the given format supports. | 147 // Returns a bitmask for the channels the given format supports. |
| 146 // See ChannelBits. | 148 // See ChannelBits. |
| 147 static uint32_t GetChannelsForFormat(int format); | 149 static uint32_t GetChannelsForFormat(int format); |
| 148 | 150 |
| 149 // Returns a bitmask for the channels the given attachment type needs. | 151 // Returns a bitmask for the channels the given attachment type needs. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 bool lose_context_when_out_of_memory; | 222 bool lose_context_when_out_of_memory; |
| 221 // 0 if not a WebGL context. | 223 // 0 if not a WebGL context. |
| 222 unsigned webgl_version; | 224 unsigned webgl_version; |
| 223 }; | 225 }; |
| 224 | 226 |
| 225 } // namespace gles2 | 227 } // namespace gles2 |
| 226 } // namespace gpu | 228 } // namespace gpu |
| 227 | 229 |
| 228 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 230 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 229 | 231 |
| OLD | NEW |