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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 static bool ComputeImageDataSizes( | 119 static bool ComputeImageDataSizes( |
120 int width, int height, int format, int type, int unpack_alignment, | 120 int width, int height, int format, int type, int unpack_alignment, |
121 uint32* size, uint32* unpadded_row_size, uint32* padded_row_size); | 121 uint32* size, uint32* unpadded_row_size, uint32* padded_row_size); |
122 | 122 |
123 static size_t RenderbufferBytesPerPixel(int format); | 123 static size_t RenderbufferBytesPerPixel(int format); |
124 | 124 |
125 static uint32 GetGLDataTypeSizeForUniforms(int type); | 125 static uint32 GetGLDataTypeSizeForUniforms(int type); |
126 | 126 |
127 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type); | 127 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type); |
128 | 128 |
| 129 static size_t GetComponentCountForGLTransformType(uint32 type); |
| 130 |
129 static uint32 GLErrorToErrorBit(uint32 gl_error); | 131 static uint32 GLErrorToErrorBit(uint32 gl_error); |
130 | 132 |
131 static uint32 GLErrorBitToGLError(uint32 error_bit); | 133 static uint32 GLErrorBitToGLError(uint32 error_bit); |
132 | 134 |
133 static uint32 IndexToGLFaceTarget(int index); | 135 static uint32 IndexToGLFaceTarget(int index); |
134 | 136 |
135 static uint32 GetPreferredGLReadPixelsFormat(uint32 internal_format); | 137 static uint32 GetPreferredGLReadPixelsFormat(uint32 internal_format); |
136 | 138 |
137 static uint32 GetPreferredGLReadPixelsType( | 139 static uint32 GetPreferredGLReadPixelsType( |
138 uint32 internal_format, uint32 texture_type); | 140 uint32 internal_format, uint32 texture_type); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 bool bind_generates_resource_; | 202 bool bind_generates_resource_; |
201 bool fail_if_major_perf_caveat_; | 203 bool fail_if_major_perf_caveat_; |
202 bool lose_context_when_out_of_memory_; | 204 bool lose_context_when_out_of_memory_; |
203 }; | 205 }; |
204 | 206 |
205 } // namespace gles2 | 207 } // namespace gles2 |
206 } // namespace gpu | 208 } // namespace gpu |
207 | 209 |
208 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 210 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
209 | 211 |
OLD | NEW |