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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 CONTEXT_LOST = 0x300E | 680 CONTEXT_LOST = 0x300E |
681 }; | 681 }; |
682 // WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in | 682 // WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in |
683 // the 16-bit range are the same as used by EGL. Those outside the 16-bit | 683 // the 16-bit range are the same as used by EGL. Those outside the 16-bit |
684 // range are unique to Chromium. Attributes are matched using a closest fit | 684 // range are unique to Chromium. Attributes are matched using a closest fit |
685 // algorithm. | 685 // algorithm. |
686 // Changes to this enum should also be copied to | 686 // Changes to this enum should also be copied to |
687 // gpu/command_buffer/common/gles2_cmd_utils.cc and to | 687 // gpu/command_buffer/common/gles2_cmd_utils.cc and to |
688 // gpu/command_buffer/client/gl_in_process_context.cc | 688 // gpu/command_buffer/client/gl_in_process_context.cc |
689 enum Attribute { | 689 enum Attribute { |
690 ALPHA_SIZE = 0x3021, | 690 ALPHA_SIZE = 0x3021, |
691 BLUE_SIZE = 0x3022, | 691 BLUE_SIZE = 0x3022, |
692 GREEN_SIZE = 0x3023, | 692 GREEN_SIZE = 0x3023, |
693 RED_SIZE = 0x3024, | 693 RED_SIZE = 0x3024, |
694 DEPTH_SIZE = 0x3025, | 694 DEPTH_SIZE = 0x3025, |
695 STENCIL_SIZE = 0x3026, | 695 STENCIL_SIZE = 0x3026, |
696 SAMPLES = 0x3031, | 696 SAMPLES = 0x3031, |
697 SAMPLE_BUFFERS = 0x3032, | 697 SAMPLE_BUFFERS = 0x3032, |
698 HEIGHT = 0x3056, | 698 HEIGHT = 0x3056, |
699 WIDTH = 0x3057, | 699 WIDTH = 0x3057, |
700 NONE = 0x3038, // Attrib list = terminator | 700 NONE = 0x3038, // Attrib list = terminator |
701 SHARE_RESOURCES = 0x10000, | 701 SHARE_RESOURCES = 0x10000, |
702 BIND_GENERATES_RESOURCES = 0x10001, | 702 BIND_GENERATES_RESOURCES = 0x10001, |
703 FAIL_IF_MAJOR_PERF_CAVEAT = 0x10002 | 703 FAIL_IF_MAJOR_PERF_CAVEAT = 0x10002, |
| 704 LOSE_CONTEXT_WHEN_OUT_OF_MEMORY = 0x10003, |
704 }; | 705 }; |
705 friend class WebGraphicsContext3DErrorMessageCallback; | 706 friend class WebGraphicsContext3DErrorMessageCallback; |
706 | 707 |
707 // Initialize the underlying GL context. May be called multiple times; second | 708 // Initialize the underlying GL context. May be called multiple times; second |
708 // and subsequent calls are ignored. Must be called from the thread that is | 709 // and subsequent calls are ignored. Must be called from the thread that is |
709 // going to use this object to issue GL commands (which might not be the main | 710 // going to use this object to issue GL commands (which might not be the main |
710 // thread). | 711 // thread). |
711 bool MaybeInitializeGL(); | 712 bool MaybeInitializeGL(); |
712 | 713 |
713 bool InitializeCommandBuffer(bool onscreen, | 714 bool InitializeCommandBuffer(bool onscreen, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 bool bind_generates_resources_; | 770 bool bind_generates_resources_; |
770 SharedMemoryLimits mem_limits_; | 771 SharedMemoryLimits mem_limits_; |
771 | 772 |
772 uint32_t flush_id_; | 773 uint32_t flush_id_; |
773 scoped_refptr<ShareGroup> share_group_; | 774 scoped_refptr<ShareGroup> share_group_; |
774 }; | 775 }; |
775 | 776 |
776 } // namespace content | 777 } // namespace content |
777 | 778 |
778 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 779 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |