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 <vector> | 9 #include <vector> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 class ProgramManager; | 35 class ProgramManager; |
36 class ShaderManager; | 36 class ShaderManager; |
37 class TextureManager; | 37 class TextureManager; |
38 class MemoryTracker; | 38 class MemoryTracker; |
39 struct DisallowedFeatures; | 39 struct DisallowedFeatures; |
40 | 40 |
41 // A Context Group helps manage multiple GLES2Decoders that share | 41 // A Context Group helps manage multiple GLES2Decoders that share |
42 // resources. | 42 // resources. |
43 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { | 43 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
44 public: | 44 public: |
45 typedef scoped_refptr<ContextGroup> Ref; | |
46 | |
47 ContextGroup( | 45 ContextGroup( |
48 MailboxManager* mailbox_manager, | 46 MailboxManager* mailbox_manager, |
49 ImageManager* image_manager, | 47 ImageManager* image_manager, |
50 MemoryTracker* memory_tracker, | 48 MemoryTracker* memory_tracker, |
51 bool bind_generates_resource); | 49 bool bind_generates_resource); |
52 | 50 |
53 // This should only be called by GLES2Decoder. This must be paired with a | 51 // This should only be called by GLES2Decoder. This must be paired with a |
54 // call to destroy if it succeeds. | 52 // call to destroy if it succeeds. |
55 bool Initialize( | 53 bool Initialize( |
56 GLES2Decoder* decoder, | 54 GLES2Decoder* decoder, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 186 |
189 scoped_ptr<TextureManager> texture_manager_; | 187 scoped_ptr<TextureManager> texture_manager_; |
190 | 188 |
191 scoped_ptr<ProgramManager> program_manager_; | 189 scoped_ptr<ProgramManager> program_manager_; |
192 | 190 |
193 scoped_ptr<ShaderManager> shader_manager_; | 191 scoped_ptr<ShaderManager> shader_manager_; |
194 | 192 |
195 linked_ptr<IdAllocatorInterface> | 193 linked_ptr<IdAllocatorInterface> |
196 id_namespaces_[id_namespaces::kNumIdNamespaces]; | 194 id_namespaces_[id_namespaces::kNumIdNamespaces]; |
197 | 195 |
198 FeatureInfo::Ref feature_info_; | 196 scoped_refptr<FeatureInfo> feature_info_; |
199 | 197 |
200 std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_; | 198 std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_; |
201 | 199 |
202 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 200 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
203 }; | 201 }; |
204 | 202 |
205 } // namespace gles2 | 203 } // namespace gles2 |
206 } // namespace gpu | 204 } // namespace gpu |
207 | 205 |
208 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 206 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
209 | 207 |
210 | 208 |
OLD | NEW |