OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 // Gets the number of values a particular id will return when a glGet | 25 // Gets the number of values a particular id will return when a glGet |
26 // function is called. If 0 is returned the id is invalid. | 26 // function is called. If 0 is returned the id is invalid. |
27 int GLGetNumValuesReturned(int id) const; | 27 int GLGetNumValuesReturned(int id) const; |
28 | 28 |
29 // Computes the size of image data for TexImage2D and TexSubImage2D. | 29 // Computes the size of image data for TexImage2D and TexSubImage2D. |
30 static uint32 ComputeImageDataSize( | 30 static uint32 ComputeImageDataSize( |
31 int width, int height, int format, int type, int unpack_alignment); | 31 int width, int height, int format, int type, int unpack_alignment); |
32 | 32 |
| 33 static uint32 GetGLDataTypeSize(int type); |
| 34 |
33 private: | 35 private: |
34 int num_compressed_texture_formats_; | 36 int num_compressed_texture_formats_; |
35 }; | 37 }; |
36 | 38 |
37 } // namespace gles2 | 39 } // namespace gles2 |
38 } // namespace gpu | 40 } // namespace gpu |
39 | 41 |
40 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 42 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
41 | 43 |
OLD | NEW |