| 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 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 // These are the same error codes as used by EGL. | 641 // These are the same error codes as used by EGL. |
| 642 enum Error { | 642 enum Error { |
| 643 SUCCESS = 0x3000, | 643 SUCCESS = 0x3000, |
| 644 BAD_ATTRIBUTE = 0x3004, | 644 BAD_ATTRIBUTE = 0x3004, |
| 645 CONTEXT_LOST = 0x300E | 645 CONTEXT_LOST = 0x300E |
| 646 }; | 646 }; |
| 647 // WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in | 647 // WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in |
| 648 // the 16-bit range are the same as used by EGL. Those outside the 16-bit | 648 // the 16-bit range are the same as used by EGL. Those outside the 16-bit |
| 649 // range are unique to Chromium. Attributes are matched using a closest fit | 649 // range are unique to Chromium. Attributes are matched using a closest fit |
| 650 // algorithm. | 650 // algorithm. |
| 651 // Changes to this enum should also be copied to |
| 652 // gpu/command_buffer/common/gles2_cmd_utils.cc and to |
| 653 // gpu/command_buffer/client/gl_in_process_context.cc |
| 651 enum Attribute { | 654 enum Attribute { |
| 652 ALPHA_SIZE = 0x3021, | 655 ALPHA_SIZE = 0x3021, |
| 653 BLUE_SIZE = 0x3022, | 656 BLUE_SIZE = 0x3022, |
| 654 GREEN_SIZE = 0x3023, | 657 GREEN_SIZE = 0x3023, |
| 655 RED_SIZE = 0x3024, | 658 RED_SIZE = 0x3024, |
| 656 DEPTH_SIZE = 0x3025, | 659 DEPTH_SIZE = 0x3025, |
| 657 STENCIL_SIZE = 0x3026, | 660 STENCIL_SIZE = 0x3026, |
| 658 SAMPLES = 0x3031, | 661 SAMPLES = 0x3031, |
| 659 SAMPLE_BUFFERS = 0x3032, | 662 SAMPLE_BUFFERS = 0x3032, |
| 660 HEIGHT = 0x3056, | 663 HEIGHT = 0x3056, |
| 661 WIDTH = 0x3057, | 664 WIDTH = 0x3057, |
| 662 NONE = 0x3038, // Attrib list = terminator | 665 NONE = 0x3038, // Attrib list = terminator |
| 663 SHARE_RESOURCES = 0x10000, | 666 SHARE_RESOURCES = 0x10000, |
| 664 BIND_GENERATES_RESOURCES = 0x10001 | 667 BIND_GENERATES_RESOURCES = 0x10001, |
| 668 FAIL_IF_MAJOR_PERF_CAVEAT = 0x10002 |
| 665 }; | 669 }; |
| 666 friend class WebGraphicsContext3DErrorMessageCallback; | 670 friend class WebGraphicsContext3DErrorMessageCallback; |
| 667 | 671 |
| 668 // Initialize the underlying GL context. May be called multiple times; second | 672 // Initialize the underlying GL context. May be called multiple times; second |
| 669 // and subsequent calls are ignored. Must be called from the thread that is | 673 // and subsequent calls are ignored. Must be called from the thread that is |
| 670 // going to use this object to issue GL commands (which might not be the main | 674 // going to use this object to issue GL commands (which might not be the main |
| 671 // thread). | 675 // thread). |
| 672 bool MaybeInitializeGL(); | 676 bool MaybeInitializeGL(); |
| 673 | 677 |
| 674 bool InitializeCommandBuffer(bool onscreen); | 678 bool InitializeCommandBuffer(bool onscreen); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 bool bind_generates_resources_; | 740 bool bind_generates_resources_; |
| 737 bool use_echo_for_swap_ack_; | 741 bool use_echo_for_swap_ack_; |
| 738 SharedMemoryLimits mem_limits_; | 742 SharedMemoryLimits mem_limits_; |
| 739 | 743 |
| 740 uint32_t flush_id_; | 744 uint32_t flush_id_; |
| 741 }; | 745 }; |
| 742 | 746 |
| 743 } // namespace content | 747 } // namespace content |
| 744 | 748 |
| 745 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 749 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |