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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 class ProgramCache; | 29 class ProgramCache; |
30 class BufferManager; | 30 class BufferManager; |
31 class GLES2Decoder; | 31 class GLES2Decoder; |
32 class FramebufferManager; | 32 class FramebufferManager; |
33 class MailboxManager; | 33 class MailboxManager; |
34 class RenderbufferManager; | 34 class RenderbufferManager; |
35 class ProgramManager; | 35 class ProgramManager; |
36 class ShaderManager; | 36 class ShaderManager; |
37 class TextureManager; | 37 class TextureManager; |
| 38 class SubscriptionRefSet; |
38 class ValuebufferManager; | 39 class ValuebufferManager; |
39 class MemoryTracker; | 40 class MemoryTracker; |
40 struct DisallowedFeatures; | 41 struct DisallowedFeatures; |
41 | 42 |
42 // A Context Group helps manage multiple GLES2Decoders that share | 43 // A Context Group helps manage multiple GLES2Decoders that share |
43 // resources. | 44 // resources. |
44 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { | 45 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
45 public: | 46 public: |
46 ContextGroup( | 47 ContextGroup( |
47 const scoped_refptr<MailboxManager>& mailbox_manager, | 48 const scoped_refptr<MailboxManager>& mailbox_manager, |
48 const scoped_refptr<MemoryTracker>& memory_tracker, | 49 const scoped_refptr<MemoryTracker>& memory_tracker, |
49 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, | 50 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, |
50 const scoped_refptr<FeatureInfo>& feature_info, | 51 const scoped_refptr<FeatureInfo>& feature_info, |
| 52 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, |
51 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, | 53 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, |
52 bool bind_generates_resource); | 54 bool bind_generates_resource); |
53 | 55 |
54 // This should only be called by GLES2Decoder. This must be paired with a | 56 // This should only be called by GLES2Decoder. This must be paired with a |
55 // call to destroy if it succeeds. | 57 // call to destroy if it succeeds. |
56 bool Initialize( | 58 bool Initialize( |
57 GLES2Decoder* decoder, | 59 GLES2Decoder* decoder, |
58 const DisallowedFeatures& disallowed_features); | 60 const DisallowedFeatures& disallowed_features); |
59 | 61 |
60 // Destroys all the resources when called for the last context in the group. | 62 // Destroys all the resources when called for the last context in the group. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 bool CheckGLFeature(GLint min_required, GLint* v); | 183 bool CheckGLFeature(GLint min_required, GLint* v); |
182 bool CheckGLFeatureU(GLint min_required, uint32* v); | 184 bool CheckGLFeatureU(GLint min_required, uint32* v); |
183 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v); | 185 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v); |
184 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); | 186 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); |
185 bool HaveContexts(); | 187 bool HaveContexts(); |
186 | 188 |
187 scoped_refptr<MailboxManager> mailbox_manager_; | 189 scoped_refptr<MailboxManager> mailbox_manager_; |
188 scoped_refptr<MemoryTracker> memory_tracker_; | 190 scoped_refptr<MemoryTracker> memory_tracker_; |
189 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; | 191 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; |
190 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; | 192 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; |
191 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; | 193 scoped_refptr<SubscriptionRefSet> subscription_ref_set_; |
| 194 scoped_refptr<ValueStateMap> pending_valuebuffer_state_; |
192 | 195 |
193 bool enforce_gl_minimums_; | 196 bool enforce_gl_minimums_; |
194 bool bind_generates_resource_; | 197 bool bind_generates_resource_; |
195 | 198 |
196 uint32 max_vertex_attribs_; | 199 uint32 max_vertex_attribs_; |
197 uint32 max_texture_units_; | 200 uint32 max_texture_units_; |
198 uint32 max_texture_image_units_; | 201 uint32 max_texture_image_units_; |
199 uint32 max_vertex_texture_image_units_; | 202 uint32 max_vertex_texture_image_units_; |
200 uint32 max_fragment_uniform_vectors_; | 203 uint32 max_fragment_uniform_vectors_; |
201 uint32 max_varying_vectors_; | 204 uint32 max_varying_vectors_; |
(...skipping 25 matching lines...) Expand all Loading... |
227 | 230 |
228 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 231 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
229 }; | 232 }; |
230 | 233 |
231 } // namespace gles2 | 234 } // namespace gles2 |
232 } // namespace gpu | 235 } // namespace gpu |
233 | 236 |
234 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 237 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
235 | 238 |
236 | 239 |
OLD | NEW |