| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 private: | 258 private: |
| 259 std::string base_name_; | 259 std::string base_name_; |
| 260 int element_index_; | 260 int element_index_; |
| 261 DISALLOW_COPY_AND_ASSIGN(GLSLArrayName); | 261 DISALLOW_COPY_AND_ASSIGN(GLSLArrayName); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 enum ContextType { | 264 enum ContextType { |
| 265 CONTEXT_TYPE_WEBGL1, | 265 CONTEXT_TYPE_WEBGL1, |
| 266 CONTEXT_TYPE_WEBGL2, | 266 CONTEXT_TYPE_WEBGL2, |
| 267 CONTEXT_TYPE_OPENGLES2, | 267 CONTEXT_TYPE_OPENGLES2, |
| 268 CONTEXT_TYPE_OPENGLES3 | 268 CONTEXT_TYPE_OPENGLES3, |
| 269 CONTEXT_TYPE_OPENGLES2_PEPPER, |
| 269 }; | 270 }; |
| 270 | 271 |
| 272 // WebGraphicsContext3DCommandBufferImpl configuration attribute for |
| 273 // ContextType. |
| 274 const int32_t kContextType = 0x10003; |
| 275 |
| 271 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { | 276 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { |
| 272 ContextCreationAttribHelper(); | 277 ContextCreationAttribHelper(); |
| 273 ContextCreationAttribHelper(const ContextCreationAttribHelper& other); | 278 ContextCreationAttribHelper(const ContextCreationAttribHelper& other); |
| 274 | 279 |
| 275 void Serialize(std::vector<int32_t>* attribs) const; | 280 void Serialize(std::vector<int32_t>* attribs) const; |
| 276 bool Parse(const std::vector<int32_t>& attribs); | 281 bool Parse(const std::vector<int32_t>& attribs); |
| 277 | 282 |
| 278 // -1 if invalid or unspecified. | 283 // -1 if invalid or unspecified. |
| 279 int32_t alpha_size; | 284 int32_t alpha_size; |
| 280 int32_t blue_size; | 285 int32_t blue_size; |
| 281 int32_t green_size; | 286 int32_t green_size; |
| 282 int32_t red_size; | 287 int32_t red_size; |
| 283 int32_t depth_size; | 288 int32_t depth_size; |
| 284 int32_t stencil_size; | 289 int32_t stencil_size; |
| 285 int32_t samples; | 290 int32_t samples; |
| 286 int32_t sample_buffers; | 291 int32_t sample_buffers; |
| 287 bool buffer_preserved; | 292 bool buffer_preserved; |
| 288 bool bind_generates_resource; | 293 bool bind_generates_resource; |
| 289 bool fail_if_major_perf_caveat; | 294 bool fail_if_major_perf_caveat; |
| 290 bool lose_context_when_out_of_memory; | 295 bool lose_context_when_out_of_memory; |
| 291 ContextType context_type; | 296 ContextType context_type; |
| 292 }; | 297 }; |
| 293 | 298 |
| 294 } // namespace gles2 | 299 } // namespace gles2 |
| 295 } // namespace gpu | 300 } // namespace gpu |
| 296 | 301 |
| 297 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 302 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 298 | 303 |
| OLD | NEW |