| 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 |
| 11 #include <stddef.h> |
| 11 #include <stdint.h> | 12 #include <stdint.h> |
| 12 | 13 |
| 13 #include <limits> | 14 #include <limits> |
| 14 #include <string> | 15 #include <string> |
| 15 #include <vector> | 16 #include <vector> |
| 16 | 17 |
| 17 #include "base/macros.h" | 18 #include "base/macros.h" |
| 18 #include "base/numerics/safe_math.h" | 19 #include "base/numerics/safe_math.h" |
| 19 #include "gpu/command_buffer/common/gles2_utils_export.h" | 20 #include "gpu/command_buffer/common/gles2_utils_export.h" |
| 20 | 21 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 static bool IsSignedIntegerFormat(uint32_t internal_format); | 213 static bool IsSignedIntegerFormat(uint32_t internal_format); |
| 213 static bool IsIntegerFormat(uint32_t internal_format); | 214 static bool IsIntegerFormat(uint32_t internal_format); |
| 214 static bool IsFloatFormat(uint32_t internal_format); | 215 static bool IsFloatFormat(uint32_t internal_format); |
| 215 | 216 |
| 216 #include "../common/gles2_cmd_utils_autogen.h" | 217 #include "../common/gles2_cmd_utils_autogen.h" |
| 217 | 218 |
| 218 private: | 219 private: |
| 219 static std::string GetQualifiedEnumString( | 220 static std::string GetQualifiedEnumString( |
| 220 const EnumToString* table, size_t count, uint32_t value); | 221 const EnumToString* table, size_t count, uint32_t value); |
| 221 | 222 |
| 222 static bool ComputeImageRowSizeHelper( | 223 static bool ComputeImageRowSizeHelper(int width, |
| 223 int width, uint32 bytes_per_group, int alignment, | 224 uint32_t bytes_per_group, |
| 224 uint32* rt_unpadded_row_size, uint32* rt_padded_row_size); | 225 int alignment, |
| 226 uint32_t* rt_unpadded_row_size, |
| 227 uint32_t* rt_padded_row_size); |
| 225 | 228 |
| 226 static const EnumToString* const enum_to_string_table_; | 229 static const EnumToString* const enum_to_string_table_; |
| 227 static const size_t enum_to_string_table_len_; | 230 static const size_t enum_to_string_table_len_; |
| 228 | 231 |
| 229 int num_compressed_texture_formats_; | 232 int num_compressed_texture_formats_; |
| 230 int num_shader_binary_formats_; | 233 int num_shader_binary_formats_; |
| 231 }; | 234 }; |
| 232 | 235 |
| 233 class GLES2_UTILS_EXPORT GLSLArrayName { | 236 class GLES2_UTILS_EXPORT GLSLArrayName { |
| 234 public: | 237 public: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 bool fail_if_major_perf_caveat; | 283 bool fail_if_major_perf_caveat; |
| 281 bool lose_context_when_out_of_memory; | 284 bool lose_context_when_out_of_memory; |
| 282 ContextType context_type; | 285 ContextType context_type; |
| 283 }; | 286 }; |
| 284 | 287 |
| 285 } // namespace gles2 | 288 } // namespace gles2 |
| 286 } // namespace gpu | 289 } // namespace gpu |
| 287 | 290 |
| 288 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 291 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 289 | 292 |
| OLD | NEW |