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_SERVICE_CONTEXT_GROUP_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 14 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
15 #include "gpu/command_buffer/service/gles2_cmd_validation.h" | 15 #include "gpu/command_buffer/service/gles2_cmd_validation.h" |
16 #include "gpu/command_buffer/service/feature_info.h" | 16 #include "gpu/command_buffer/service/feature_info.h" |
17 #include "gpu/gpu_export.h" | |
18 | 17 |
19 namespace gpu { | 18 namespace gpu { |
20 | 19 |
21 class IdAllocatorInterface; | 20 class IdAllocatorInterface; |
22 | 21 |
23 namespace gles2 { | 22 namespace gles2 { |
24 | 23 |
25 class GLES2Decoder; | 24 class GLES2Decoder; |
26 class BufferManager; | 25 class BufferManager; |
27 class FramebufferManager; | 26 class FramebufferManager; |
28 class RenderbufferManager; | 27 class RenderbufferManager; |
29 class ProgramManager; | 28 class ProgramManager; |
30 class ShaderManager; | 29 class ShaderManager; |
31 class TextureManager; | 30 class TextureManager; |
32 struct DisallowedFeatures; | 31 struct DisallowedFeatures; |
33 | 32 |
34 // A Context Group helps manage multiple GLES2Decoders that share | 33 // A Context Group helps manage multiple GLES2Decoders that share |
35 // resources. | 34 // resources. |
36 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { | 35 class ContextGroup : public base::RefCounted<ContextGroup> { |
37 public: | 36 public: |
38 typedef scoped_refptr<ContextGroup> Ref; | 37 typedef scoped_refptr<ContextGroup> Ref; |
39 | 38 |
40 explicit ContextGroup(bool bind_generates_resource); | 39 explicit ContextGroup(bool bind_generates_resource); |
41 ~ContextGroup(); | 40 ~ContextGroup(); |
42 | 41 |
43 // This should only be called by GLES2Decoder. This must be paired with a | 42 // This should only be called by GLES2Decoder. This must be paired with a |
44 // call to destroy if it succeeds. | 43 // call to destroy if it succeeds. |
45 bool Initialize(const DisallowedFeatures& disallowed_features, | 44 bool Initialize(const DisallowedFeatures& disallowed_features, |
46 const char* allowed_features); | 45 const char* allowed_features); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 142 |
144 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 143 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
145 }; | 144 }; |
146 | 145 |
147 } // namespace gles2 | 146 } // namespace gles2 |
148 } // namespace gpu | 147 } // namespace gpu |
149 | 148 |
150 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 149 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
151 | 150 |
152 | 151 |
OLD | NEW |