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 25 matching lines...) Expand all Loading... |
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 ContextGroup( | 45 ContextGroup( |
46 MailboxManager* mailbox_manager, | 46 const scoped_refptr<MailboxManager>& mailbox_manager, |
47 MemoryTracker* memory_tracker, | 47 const scoped_refptr<MemoryTracker>& memory_tracker, |
48 ShaderTranslatorCache* shader_translator_cache, | 48 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, |
49 FeatureInfo* feature_info, | 49 const scoped_refptr<FeatureInfo>& feature_info, |
50 bool bind_generates_resource); | 50 bool bind_generates_resource); |
51 | 51 |
52 // This should only be called by GLES2Decoder. This must be paired with a | 52 // This should only be called by GLES2Decoder. This must be paired with a |
53 // call to destroy if it succeeds. | 53 // call to destroy if it succeeds. |
54 bool Initialize( | 54 bool Initialize( |
55 GLES2Decoder* decoder, | 55 GLES2Decoder* decoder, |
56 const DisallowedFeatures& disallowed_features); | 56 const DisallowedFeatures& disallowed_features); |
57 | 57 |
58 // Destroys all the resources when called for the last context in the group. | 58 // Destroys all the resources when called for the last context in the group. |
59 // It should only be called by GLES2Decoder. | 59 // It should only be called by GLES2Decoder. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 220 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace gles2 | 223 } // namespace gles2 |
224 } // namespace gpu | 224 } // namespace gpu |
225 | 225 |
226 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 226 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
227 | 227 |
228 | 228 |
OLD | NEW |