OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/linked_ptr.h" | 11 #include "base/linked_ptr.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "gpu/command_buffer/service/gles2_cmd_validation.h" | 14 #include "gpu/command_buffer/service/gles2_cmd_validation.h" |
15 #include "gpu/command_buffer/service/feature_info.h" | 15 #include "gpu/command_buffer/service/feature_info.h" |
16 | 16 |
17 namespace gpu { | 17 namespace gpu { |
18 | 18 |
19 class IdAllocator; | 19 class IdAllocator; |
20 | 20 |
21 namespace gles2 { | 21 namespace gles2 { |
22 | 22 |
23 class GLES2Decoder; | 23 class GLES2Decoder; |
24 class BufferManager; | 24 class BufferManager; |
25 class FramebufferManager; | 25 class FramebufferManager; |
26 class RenderbufferManager; | 26 class RenderbufferManager; |
27 class ProgramManager; | 27 class ProgramManager; |
28 class ShaderManager; | 28 class ShaderManager; |
29 class TextureManager; | 29 class TextureManager; |
| 30 struct DisallowedExtensions; |
30 | 31 |
31 // A Context Group helps manage multiple GLES2Decoders that share | 32 // A Context Group helps manage multiple GLES2Decoders that share |
32 // resources. | 33 // resources. |
33 class ContextGroup : public base::RefCounted<ContextGroup> { | 34 class ContextGroup : public base::RefCounted<ContextGroup> { |
34 public: | 35 public: |
35 typedef scoped_refptr<ContextGroup> Ref; | 36 typedef scoped_refptr<ContextGroup> Ref; |
36 | 37 |
37 ContextGroup(); | 38 ContextGroup(); |
38 ~ContextGroup(); | 39 ~ContextGroup(); |
39 | 40 |
40 // This should only be called by GLES2Decoder. | 41 // This should only be called by GLES2Decoder. |
41 bool Initialize(const char* allowed_features); | 42 bool Initialize(const DisallowedExtensions& disallowed_extensions, |
| 43 const char* allowed_features); |
42 | 44 |
43 // Sets the ContextGroup has having a lost context. | 45 // Sets the ContextGroup has having a lost context. |
44 void set_have_context(bool have_context) { | 46 void set_have_context(bool have_context) { |
45 have_context_ = have_context; | 47 have_context_ = have_context; |
46 } | 48 } |
47 | 49 |
48 uint32 max_vertex_attribs() const { | 50 uint32 max_vertex_attribs() const { |
49 return max_vertex_attribs_; | 51 return max_vertex_attribs_; |
50 } | 52 } |
51 | 53 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 140 |
139 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 141 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
140 }; | 142 }; |
141 | 143 |
142 } // namespace gles2 | 144 } // namespace gles2 |
143 } // namespace gpu | 145 } // namespace gpu |
144 | 146 |
145 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 147 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
146 | 148 |
147 | 149 |
OLD | NEW |