| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 enum ContextType { | 261 enum ContextType { |
| 262 CONTEXT_TYPE_WEBGL1, | 262 CONTEXT_TYPE_WEBGL1, |
| 263 CONTEXT_TYPE_WEBGL2, | 263 CONTEXT_TYPE_WEBGL2, |
| 264 CONTEXT_TYPE_OPENGLES2, | 264 CONTEXT_TYPE_OPENGLES2, |
| 265 CONTEXT_TYPE_OPENGLES3 | 265 CONTEXT_TYPE_OPENGLES3 |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { | 268 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { |
| 269 ContextCreationAttribHelper(); | 269 ContextCreationAttribHelper(); |
| 270 ContextCreationAttribHelper(const ContextCreationAttribHelper& other); |
| 270 | 271 |
| 271 void Serialize(std::vector<int32_t>* attribs) const; | 272 void Serialize(std::vector<int32_t>* attribs) const; |
| 272 bool Parse(const std::vector<int32_t>& attribs); | 273 bool Parse(const std::vector<int32_t>& attribs); |
| 273 | 274 |
| 274 // -1 if invalid or unspecified. | 275 // -1 if invalid or unspecified. |
| 275 int32_t alpha_size; | 276 int32_t alpha_size; |
| 276 int32_t blue_size; | 277 int32_t blue_size; |
| 277 int32_t green_size; | 278 int32_t green_size; |
| 278 int32_t red_size; | 279 int32_t red_size; |
| 279 int32_t depth_size; | 280 int32_t depth_size; |
| 280 int32_t stencil_size; | 281 int32_t stencil_size; |
| 281 int32_t samples; | 282 int32_t samples; |
| 282 int32_t sample_buffers; | 283 int32_t sample_buffers; |
| 283 bool buffer_preserved; | 284 bool buffer_preserved; |
| 284 bool bind_generates_resource; | 285 bool bind_generates_resource; |
| 285 bool fail_if_major_perf_caveat; | 286 bool fail_if_major_perf_caveat; |
| 286 bool lose_context_when_out_of_memory; | 287 bool lose_context_when_out_of_memory; |
| 287 ContextType context_type; | 288 ContextType context_type; |
| 288 }; | 289 }; |
| 289 | 290 |
| 290 } // namespace gles2 | 291 } // namespace gles2 |
| 291 } // namespace gpu | 292 } // namespace gpu |
| 292 | 293 |
| 293 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 294 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 294 | 295 |
| OLD | NEW |