| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 static std::string GetQualifiedEnumString( | 197 static std::string GetQualifiedEnumString( |
| 198 const EnumToString* table, size_t count, uint32_t value); | 198 const EnumToString* table, size_t count, uint32_t value); |
| 199 | 199 |
| 200 static const EnumToString* const enum_to_string_table_; | 200 static const EnumToString* const enum_to_string_table_; |
| 201 static const size_t enum_to_string_table_len_; | 201 static const size_t enum_to_string_table_len_; |
| 202 | 202 |
| 203 int num_compressed_texture_formats_; | 203 int num_compressed_texture_formats_; |
| 204 int num_shader_binary_formats_; | 204 int num_shader_binary_formats_; |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 enum ContextType { |
| 208 CONTEXT_TYPE_WEBGL1, |
| 209 CONTEXT_TYPE_WEBGL2, |
| 210 CONTEXT_TYPE_OPENGLES2, |
| 211 CONTEXT_TYPE_OPENGLES3 |
| 212 }; |
| 213 |
| 207 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { | 214 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { |
| 208 ContextCreationAttribHelper(); | 215 ContextCreationAttribHelper(); |
| 209 | 216 |
| 210 void Serialize(std::vector<int32_t>* attribs) const; | 217 void Serialize(std::vector<int32_t>* attribs) const; |
| 211 bool Parse(const std::vector<int32_t>& attribs); | 218 bool Parse(const std::vector<int32_t>& attribs); |
| 212 | 219 |
| 213 // -1 if invalid or unspecified. | 220 // -1 if invalid or unspecified. |
| 214 int32_t alpha_size; | 221 int32_t alpha_size; |
| 215 int32_t blue_size; | 222 int32_t blue_size; |
| 216 int32_t green_size; | 223 int32_t green_size; |
| 217 int32_t red_size; | 224 int32_t red_size; |
| 218 int32_t depth_size; | 225 int32_t depth_size; |
| 219 int32_t stencil_size; | 226 int32_t stencil_size; |
| 220 int32_t samples; | 227 int32_t samples; |
| 221 int32_t sample_buffers; | 228 int32_t sample_buffers; |
| 222 bool buffer_preserved; | 229 bool buffer_preserved; |
| 223 bool bind_generates_resource; | 230 bool bind_generates_resource; |
| 224 bool fail_if_major_perf_caveat; | 231 bool fail_if_major_perf_caveat; |
| 225 bool lose_context_when_out_of_memory; | 232 bool lose_context_when_out_of_memory; |
| 226 // 0 if not a WebGL context. | 233 ContextType context_type; |
| 227 unsigned webgl_version; | |
| 228 }; | 234 }; |
| 229 | 235 |
| 230 } // namespace gles2 | 236 } // namespace gles2 |
| 231 } // namespace gpu | 237 } // namespace gpu |
| 232 | 238 |
| 233 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 239 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 234 | 240 |
| OLD | NEW |