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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "gpu/command_buffer/common/constants.h" | 16 #include "gpu/command_buffer/common/constants.h" |
17 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 17 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
18 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 18 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
19 #include "gpu/command_buffer/service/feature_info.h" | 19 #include "gpu/command_buffer/service/feature_info.h" |
20 #include "gpu/command_buffer/service/framebuffer_completeness_cache.h" | 20 #include "gpu/command_buffer/service/framebuffer_completeness_cache.h" |
21 #include "gpu/command_buffer/service/gpu_preferences.h" | 21 #include "gpu/command_buffer/service/gpu_preferences.h" |
22 #include "gpu/command_buffer/service/shader_translator_cache.h" | 22 #include "gpu/command_buffer/service/shader_translator_cache.h" |
23 #include "gpu/gpu_export.h" | 23 #include "gpu/gpu_export.h" |
24 | 24 |
25 namespace gpu { | 25 namespace gpu { |
26 | 26 |
27 struct GpuPreferences; | 27 struct GpuPreferences; |
| 28 struct GpuDriverBugWorkarounds; |
28 class TransferBufferManager; | 29 class TransferBufferManager; |
29 class ValueStateMap; | 30 class ValueStateMap; |
30 | 31 |
31 namespace gles2 { | 32 namespace gles2 { |
32 | 33 |
33 class ProgramCache; | 34 class ProgramCache; |
34 class BufferManager; | 35 class BufferManager; |
35 class GLES2Decoder; | 36 class GLES2Decoder; |
36 class FramebufferManager; | 37 class FramebufferManager; |
37 class MailboxManager; | 38 class MailboxManager; |
38 class RenderbufferManager; | 39 class RenderbufferManager; |
39 class PathManager; | 40 class PathManager; |
40 class ProgramManager; | 41 class ProgramManager; |
41 class SamplerManager; | 42 class SamplerManager; |
42 class ShaderManager; | 43 class ShaderManager; |
43 class TextureManager; | 44 class TextureManager; |
44 class SubscriptionRefSet; | 45 class SubscriptionRefSet; |
45 class ValuebufferManager; | 46 class ValuebufferManager; |
46 class MemoryTracker; | 47 class MemoryTracker; |
47 struct DisallowedFeatures; | 48 struct DisallowedFeatures; |
48 | 49 |
49 // A Context Group helps manage multiple GLES2Decoders that share | 50 // A Context Group helps manage multiple GLES2Decoders that share |
50 // resources. | 51 // resources. |
51 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { | 52 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
52 public: | 53 public: |
53 ContextGroup( | 54 ContextGroup( |
54 const GpuPreferences& gpu_preferences, | 55 const GpuPreferences& gpu_preferences, |
| 56 const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds, |
55 const scoped_refptr<MailboxManager>& mailbox_manager, | 57 const scoped_refptr<MailboxManager>& mailbox_manager, |
56 const scoped_refptr<MemoryTracker>& memory_tracker, | 58 const scoped_refptr<MemoryTracker>& memory_tracker, |
57 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, | 59 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, |
58 const scoped_refptr<FramebufferCompletenessCache>& | 60 const scoped_refptr<FramebufferCompletenessCache>& |
59 framebuffer_completeness_cache, | 61 framebuffer_completeness_cache, |
60 const scoped_refptr<FeatureInfo>& feature_info, | 62 const scoped_refptr<FeatureInfo>& feature_info, |
61 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, | 63 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, |
62 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, | 64 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, |
63 bool bind_generates_resource); | 65 bool bind_generates_resource); |
64 | 66 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 base::hash_map<GLuint, GLuint> transformfeedbacks_id_map_; | 309 base::hash_map<GLuint, GLuint> transformfeedbacks_id_map_; |
308 base::hash_map<GLuint, GLsync> syncs_id_map_; | 310 base::hash_map<GLuint, GLsync> syncs_id_map_; |
309 | 311 |
310 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 312 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
311 }; | 313 }; |
312 | 314 |
313 } // namespace gles2 | 315 } // namespace gles2 |
314 } // namespace gpu | 316 } // namespace gpu |
315 | 317 |
316 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 318 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
OLD | NEW |