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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 static uint32_t GetGLDataTypeSizeForUniforms(int type); | 134 static uint32_t GetGLDataTypeSizeForUniforms(int type); |
135 | 135 |
136 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); | 136 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); |
137 | 137 |
138 static uint32_t GLErrorToErrorBit(uint32_t gl_error); | 138 static uint32_t GLErrorToErrorBit(uint32_t gl_error); |
139 | 139 |
140 static uint32_t GLErrorBitToGLError(uint32_t error_bit); | 140 static uint32_t GLErrorBitToGLError(uint32_t error_bit); |
141 | 141 |
142 static uint32_t IndexToGLFaceTarget(int index); | 142 static uint32_t IndexToGLFaceTarget(int index); |
143 | 143 |
| 144 static size_t GLTargetToFaceIndex(uint32_t target); |
| 145 |
144 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); | 146 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); |
145 | 147 |
146 static uint32_t GetPreferredGLReadPixelsType( | 148 static uint32_t GetPreferredGLReadPixelsType( |
147 uint32_t internal_format, uint32_t texture_type); | 149 uint32_t internal_format, uint32_t texture_type); |
148 | 150 |
149 // Returns a bitmask for the channels the given format supports. | 151 // Returns a bitmask for the channels the given format supports. |
150 // See ChannelBits. | 152 // See ChannelBits. |
151 static uint32_t GetChannelsForFormat(int format); | 153 static uint32_t GetChannelsForFormat(int format); |
152 | 154 |
153 // Returns a bitmask for the channels the given attachment type needs. | 155 // Returns a bitmask for the channels the given attachment type needs. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 bool bind_generates_resource_; | 211 bool bind_generates_resource_; |
210 bool fail_if_major_perf_caveat_; | 212 bool fail_if_major_perf_caveat_; |
211 bool lose_context_when_out_of_memory_; | 213 bool lose_context_when_out_of_memory_; |
212 }; | 214 }; |
213 | 215 |
214 } // namespace gles2 | 216 } // namespace gles2 |
215 } // namespace gpu | 217 } // namespace gpu |
216 | 218 |
217 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 219 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
218 | 220 |
OLD | NEW |