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 GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
7 | 7 |
8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 class ShareGroup; | 37 class ShareGroup; |
38 | 38 |
39 }; | 39 }; |
40 | 40 |
41 class GLManager : private GpuControl { | 41 class GLManager : private GpuControl { |
42 public: | 42 public: |
43 struct Options { | 43 struct Options { |
44 Options(); | 44 Options(); |
45 // The size of the backbuffer. | 45 // The size of the backbuffer. |
46 gfx::Size size; | 46 gfx::Size size; |
| 47 // The amount of stencil buffer bits. Default is -1, no stencil buffer. |
| 48 int stencil_size; |
47 // If not null will share resources with this context. | 49 // If not null will share resources with this context. |
48 GLManager* share_group_manager; | 50 GLManager* share_group_manager; |
49 // If not null will share a mailbox manager with this context. | 51 // If not null will share a mailbox manager with this context. |
50 GLManager* share_mailbox_manager; | 52 GLManager* share_mailbox_manager; |
51 // If not null will create a virtual manager based on this context. | 53 // If not null will create a virtual manager based on this context. |
52 GLManager* virtual_manager; | 54 GLManager* virtual_manager; |
53 // Whether or not glBindXXX generates a resource. | 55 // Whether or not glBindXXX generates a resource. |
54 bool bind_generates_resource; | 56 bool bind_generates_resource; |
55 // Whether or not the context is auto-lost when GL_OUT_OF_MEMORY occurs. | 57 // Whether or not the context is auto-lost when GL_OUT_OF_MEMORY occurs. |
56 bool lose_context_when_out_of_memory; | 58 bool lose_context_when_out_of_memory; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // Used on Android to virtualize GL for all contexts. | 133 // Used on Android to virtualize GL for all contexts. |
132 static int use_count_; | 134 static int use_count_; |
133 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 135 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
134 static scoped_refptr<gfx::GLSurface>* base_surface_; | 136 static scoped_refptr<gfx::GLSurface>* base_surface_; |
135 static scoped_refptr<gfx::GLContext>* base_context_; | 137 static scoped_refptr<gfx::GLContext>* base_context_; |
136 }; | 138 }; |
137 | 139 |
138 } // namespace gpu | 140 } // namespace gpu |
139 | 141 |
140 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 142 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
OLD | NEW |