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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 | 206 |
207 static const EnumToString* const enum_to_string_table_; | 207 static const EnumToString* const enum_to_string_table_; |
208 static const size_t enum_to_string_table_len_; | 208 static const size_t enum_to_string_table_len_; |
209 | 209 |
210 int num_compressed_texture_formats_; | 210 int num_compressed_texture_formats_; |
211 int num_shader_binary_formats_; | 211 int num_shader_binary_formats_; |
212 }; | 212 }; |
213 | 213 |
214 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { | 214 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { |
215 ContextCreationAttribHelper(); | 215 ContextCreationAttribHelper(); |
216 enum ContextType { | |
Zhenyao Mo
2015/08/28 17:16:25
Can we move this outside ContextCreationAttribHelp
Kimmo Kinnunen
2015/08/31 12:23:13
Done.
| |
217 CONTEXT_TYPE_WEBGL1, | |
218 CONTEXT_TYPE_WEBGL2, | |
219 CONTEXT_TYPE_OPENGLES2, | |
220 CONTEXT_TYPE_OPENGLES3 | |
221 }; | |
216 | 222 |
217 void Serialize(std::vector<int32_t>* attribs) const; | 223 void Serialize(std::vector<int32_t>* attribs) const; |
218 bool Parse(const std::vector<int32_t>& attribs); | 224 bool Parse(const std::vector<int32_t>& attribs); |
219 | 225 |
220 // -1 if invalid or unspecified. | 226 // -1 if invalid or unspecified. |
221 int32_t alpha_size; | 227 int32_t alpha_size; |
222 int32_t blue_size; | 228 int32_t blue_size; |
223 int32_t green_size; | 229 int32_t green_size; |
224 int32_t red_size; | 230 int32_t red_size; |
225 int32_t depth_size; | 231 int32_t depth_size; |
226 int32_t stencil_size; | 232 int32_t stencil_size; |
227 int32_t samples; | 233 int32_t samples; |
228 int32_t sample_buffers; | 234 int32_t sample_buffers; |
229 bool buffer_preserved; | 235 bool buffer_preserved; |
230 bool bind_generates_resource; | 236 bool bind_generates_resource; |
231 bool fail_if_major_perf_caveat; | 237 bool fail_if_major_perf_caveat; |
232 bool lose_context_when_out_of_memory; | 238 bool lose_context_when_out_of_memory; |
233 // 0 if not a WebGL context. | 239 ContextType context_type; |
234 unsigned webgl_version; | |
235 }; | 240 }; |
236 | 241 |
237 } // namespace gles2 | 242 } // namespace gles2 |
238 } // namespace gpu | 243 } // namespace gpu |
239 | 244 |
240 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 245 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
241 | 246 |
OLD | NEW |