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 <vector> | 8 #include <vector> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 26 matching lines...) Expand all Loading... | |
37 class TextureManager; | 37 class TextureManager; |
38 class SubscriptionRefSet; | 38 class SubscriptionRefSet; |
39 class ValuebufferManager; | 39 class ValuebufferManager; |
40 class MemoryTracker; | 40 class MemoryTracker; |
41 struct DisallowedFeatures; | 41 struct DisallowedFeatures; |
42 | 42 |
43 // A Context Group helps manage multiple GLES2Decoders that share | 43 // A Context Group helps manage multiple GLES2Decoders that share |
44 // resources. | 44 // resources. |
45 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { | 45 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
46 public: | 46 public: |
47 enum ContextType { | 47 enum ContextType { |
Zhenyao Mo
2015/08/28 17:16:25
Can we not redefine the ContextType? And just use
Kimmo Kinnunen
2015/08/31 12:23:13
Sure. (To me, they appeared as being in different
| |
48 CONTEXT_TYPE_WEBGL1, | 48 CONTEXT_TYPE_WEBGL1, |
49 CONTEXT_TYPE_WEBGL2, | 49 CONTEXT_TYPE_WEBGL2, |
50 CONTEXT_TYPE_OTHER, | 50 CONTEXT_TYPE_OPENGLES2, |
51 CONTEXT_TYPE_UNDEFINED | 51 CONTEXT_TYPE_OPENGLES3 |
52 }; | 52 }; |
53 | 53 |
54 static ContextType GetContextType(unsigned webgl_version); | |
55 | |
56 ContextGroup( | 54 ContextGroup( |
57 const scoped_refptr<MailboxManager>& mailbox_manager, | 55 const scoped_refptr<MailboxManager>& mailbox_manager, |
58 const scoped_refptr<MemoryTracker>& memory_tracker, | 56 const scoped_refptr<MemoryTracker>& memory_tracker, |
59 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, | 57 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, |
60 const scoped_refptr<FramebufferCompletenessCache>& | 58 const scoped_refptr<FramebufferCompletenessCache>& |
61 framebuffer_completeness_cache, | 59 framebuffer_completeness_cache, |
62 const scoped_refptr<FeatureInfo>& feature_info, | 60 const scoped_refptr<FeatureInfo>& feature_info, |
63 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, | 61 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, |
64 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, | 62 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, |
65 bool bind_generates_resource); | 63 bool bind_generates_resource); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 | 309 |
312 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 310 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
313 }; | 311 }; |
314 | 312 |
315 } // namespace gles2 | 313 } // namespace gles2 |
316 } // namespace gpu | 314 } // namespace gpu |
317 | 315 |
318 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 316 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
319 | 317 |
320 | 318 |
OLD | NEW |