| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 void set_num_shader_binary_formats(int num_shader_binary_formats) { | 134 void set_num_shader_binary_formats(int num_shader_binary_formats) { |
| 135 num_shader_binary_formats_ = num_shader_binary_formats; | 135 num_shader_binary_formats_ = num_shader_binary_formats; |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Gets the number of values a particular id will return when a glGet | 138 // Gets the number of values a particular id will return when a glGet |
| 139 // function is called. If 0 is returned the id is invalid. | 139 // function is called. If 0 is returned the id is invalid. |
| 140 int GLGetNumValuesReturned(int id) const; | 140 int GLGetNumValuesReturned(int id) const; |
| 141 | 141 |
| 142 static int ElementsPerGroup(int format, int type); |
| 142 // Computes the size of a single group of elements from a format and type pair | 143 // Computes the size of a single group of elements from a format and type pair |
| 143 static uint32_t ComputeImageGroupSize(int format, int type); | 144 static uint32_t ComputeImageGroupSize(int format, int type); |
| 144 | 145 |
| 145 // Computes the size of an image row including alignment padding | 146 // Computes the size of an image row including alignment padding |
| 146 static bool ComputeImagePaddedRowSize( | 147 static bool ComputeImagePaddedRowSize( |
| 147 int width, int format, int type, int alignment, | 148 int width, int format, int type, int alignment, |
| 148 uint32_t* padded_row_size); | 149 uint32_t* padded_row_size); |
| 149 | 150 |
| 150 // Computes the size of image data for TexImage2D and TexSubImage2D. | 151 // Computes the size of image data for TexImage2D and TexSubImage2D. |
| 151 // Optionally the unpadded and padded row sizes can be returned. | 152 // Optionally the unpadded and padded row sizes can be returned. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 bool should_use_native_gmb_for_backbuffer; | 329 bool should_use_native_gmb_for_backbuffer; |
| 329 | 330 |
| 330 ContextType context_type; | 331 ContextType context_type; |
| 331 }; | 332 }; |
| 332 | 333 |
| 333 } // namespace gles2 | 334 } // namespace gles2 |
| 334 } // namespace gpu | 335 } // namespace gpu |
| 335 | 336 |
| 336 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 337 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 337 | 338 |
| OLD | NEW |