| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 class ProgramCache; | 30 class ProgramCache; |
| 31 class BufferManager; | 31 class BufferManager; |
| 32 class GLES2Decoder; | 32 class GLES2Decoder; |
| 33 class FramebufferManager; | 33 class FramebufferManager; |
| 34 class MailboxManager; | 34 class MailboxManager; |
| 35 class RenderbufferManager; | 35 class RenderbufferManager; |
| 36 class ProgramManager; | 36 class ProgramManager; |
| 37 class ShaderManager; | 37 class ShaderManager; |
| 38 class TextureManager; | 38 class TextureManager; |
| 39 class SubscriptionRefSet; |
| 39 class ValuebufferManager; | 40 class ValuebufferManager; |
| 40 class MemoryTracker; | 41 class MemoryTracker; |
| 41 struct DisallowedFeatures; | 42 struct DisallowedFeatures; |
| 42 | 43 |
| 43 // A Context Group helps manage multiple GLES2Decoders that share | 44 // A Context Group helps manage multiple GLES2Decoders that share |
| 44 // resources. | 45 // resources. |
| 45 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { | 46 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
| 46 public: | 47 public: |
| 47 ContextGroup( | 48 ContextGroup( |
| 48 const scoped_refptr<MailboxManager>& mailbox_manager, | 49 const scoped_refptr<MailboxManager>& mailbox_manager, |
| 49 const scoped_refptr<MemoryTracker>& memory_tracker, | 50 const scoped_refptr<MemoryTracker>& memory_tracker, |
| 50 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, | 51 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, |
| 51 const scoped_refptr<FeatureInfo>& feature_info, | 52 const scoped_refptr<FeatureInfo>& feature_info, |
| 53 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, |
| 52 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, | 54 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, |
| 53 bool bind_generates_resource); | 55 bool bind_generates_resource); |
| 54 | 56 |
| 55 // This should only be called by GLES2Decoder. This must be paired with a | 57 // This should only be called by GLES2Decoder. This must be paired with a |
| 56 // call to destroy if it succeeds. | 58 // call to destroy if it succeeds. |
| 57 bool Initialize( | 59 bool Initialize( |
| 58 GLES2Decoder* decoder, | 60 GLES2Decoder* decoder, |
| 59 const DisallowedFeatures& disallowed_features); | 61 const DisallowedFeatures& disallowed_features); |
| 60 | 62 |
| 61 // Destroys all the resources when called for the last context in the group. | 63 // Destroys all the resources when called for the last context in the group. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 bool CheckGLFeature(GLint min_required, GLint* v); | 221 bool CheckGLFeature(GLint min_required, GLint* v); |
| 220 bool CheckGLFeatureU(GLint min_required, uint32* v); | 222 bool CheckGLFeatureU(GLint min_required, uint32* v); |
| 221 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v); | 223 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v); |
| 222 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); | 224 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); |
| 223 bool HaveContexts(); | 225 bool HaveContexts(); |
| 224 | 226 |
| 225 scoped_refptr<MailboxManager> mailbox_manager_; | 227 scoped_refptr<MailboxManager> mailbox_manager_; |
| 226 scoped_refptr<MemoryTracker> memory_tracker_; | 228 scoped_refptr<MemoryTracker> memory_tracker_; |
| 227 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; | 229 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; |
| 228 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; | 230 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; |
| 229 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; | 231 scoped_refptr<SubscriptionRefSet> subscription_ref_set_; |
| 232 scoped_refptr<ValueStateMap> pending_valuebuffer_state_; |
| 230 | 233 |
| 231 bool enforce_gl_minimums_; | 234 bool enforce_gl_minimums_; |
| 232 bool bind_generates_resource_; | 235 bool bind_generates_resource_; |
| 233 | 236 |
| 234 uint32 max_vertex_attribs_; | 237 uint32 max_vertex_attribs_; |
| 235 uint32 max_texture_units_; | 238 uint32 max_texture_units_; |
| 236 uint32 max_texture_image_units_; | 239 uint32 max_texture_image_units_; |
| 237 uint32 max_vertex_texture_image_units_; | 240 uint32 max_vertex_texture_image_units_; |
| 238 uint32 max_fragment_uniform_vectors_; | 241 uint32 max_fragment_uniform_vectors_; |
| 239 uint32 max_varying_vectors_; | 242 uint32 max_varying_vectors_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 269 | 272 |
| 270 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 273 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
| 271 }; | 274 }; |
| 272 | 275 |
| 273 } // namespace gles2 | 276 } // namespace gles2 |
| 274 } // namespace gpu | 277 } // namespace gpu |
| 275 | 278 |
| 276 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 279 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
| 277 | 280 |
| 278 | 281 |
| OLD | NEW |