Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: gpu/command_buffer/service/context_group.h

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/common/gl_mock.h ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "gpu/command_buffer/common/gles2_cmd_format.h" 14 #include "gpu/command_buffer/common/gles2_cmd_format.h"
15 #include "gpu/command_buffer/service/gles2_cmd_validation.h" 15 #include "gpu/command_buffer/service/gles2_cmd_validation.h"
16 #include "gpu/command_buffer/service/feature_info.h" 16 #include "gpu/command_buffer/service/feature_info.h"
17 #include "gpu/gpu_export.h" 17 #include "gpu/gpu_export.h"
18 18
19 namespace gpu { 19 namespace gpu {
20 20
21 class IdAllocatorInterface; 21 class IdAllocatorInterface;
22 class TransferBufferManagerInterface; 22 class TransferBufferManagerInterface;
23 23
24 namespace gles2 { 24 namespace gles2 {
25 25
26 class ProgramCache;
27 class BufferManager; 26 class BufferManager;
28 class GLES2Decoder; 27 class GLES2Decoder;
29 class FramebufferManager; 28 class FramebufferManager;
30 class MailboxManager; 29 class MailboxManager;
31 class RenderbufferManager; 30 class RenderbufferManager;
32 class ProgramManager; 31 class ProgramManager;
33 class ShaderManager; 32 class ShaderManager;
34 class TextureManager; 33 class TextureManager;
35 struct DisallowedFeatures; 34 struct DisallowedFeatures;
36 35
37 // A Context Group helps manage multiple GLES2Decoders that share 36 // A Context Group helps manage multiple GLES2Decoders that share
38 // resources. 37 // resources.
39 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { 38 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
40 public: 39 public:
41 typedef scoped_refptr<ContextGroup> Ref; 40 typedef scoped_refptr<ContextGroup> Ref;
42 41
43 ContextGroup( 42 ContextGroup(
44 MailboxManager* mailbox_manager, 43 MailboxManager* mailbox_manager,
45 bool bind_generates_resource, 44 bool bind_generates_resource);
46 ProgramCache* program_cache);
47 45
48 // This should only be called by GLES2Decoder. This must be paired with a 46 // This should only be called by GLES2Decoder. This must be paired with a
49 // call to destroy if it succeeds. 47 // call to destroy if it succeeds.
50 bool Initialize(const DisallowedFeatures& disallowed_features, 48 bool Initialize(const DisallowedFeatures& disallowed_features,
51 const char* allowed_features); 49 const char* allowed_features);
52 50
53 // Destroys all the resources when called for the last context in the group. 51 // Destroys all the resources when called for the last context in the group.
54 // It should only be called by GLES2Decoder. 52 // It should only be called by GLES2Decoder.
55 void Destroy(bool have_context); 53 void Destroy(bool have_context);
56 54
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 bool bind_generates_resource_; 142 bool bind_generates_resource_;
145 143
146 uint32 max_vertex_attribs_; 144 uint32 max_vertex_attribs_;
147 uint32 max_texture_units_; 145 uint32 max_texture_units_;
148 uint32 max_texture_image_units_; 146 uint32 max_texture_image_units_;
149 uint32 max_vertex_texture_image_units_; 147 uint32 max_vertex_texture_image_units_;
150 uint32 max_fragment_uniform_vectors_; 148 uint32 max_fragment_uniform_vectors_;
151 uint32 max_varying_vectors_; 149 uint32 max_varying_vectors_;
152 uint32 max_vertex_uniform_vectors_; 150 uint32 max_vertex_uniform_vectors_;
153 151
154 ProgramCache* program_cache_;
155
156 scoped_ptr<BufferManager> buffer_manager_; 152 scoped_ptr<BufferManager> buffer_manager_;
157 153
158 scoped_ptr<FramebufferManager> framebuffer_manager_; 154 scoped_ptr<FramebufferManager> framebuffer_manager_;
159 155
160 scoped_ptr<RenderbufferManager> renderbuffer_manager_; 156 scoped_ptr<RenderbufferManager> renderbuffer_manager_;
161 157
162 scoped_ptr<TextureManager> texture_manager_; 158 scoped_ptr<TextureManager> texture_manager_;
163 159
164 scoped_ptr<ProgramManager> program_manager_; 160 scoped_ptr<ProgramManager> program_manager_;
165 161
166 scoped_ptr<ShaderManager> shader_manager_; 162 scoped_ptr<ShaderManager> shader_manager_;
167 163
168 linked_ptr<IdAllocatorInterface> 164 linked_ptr<IdAllocatorInterface>
169 id_namespaces_[id_namespaces::kNumIdNamespaces]; 165 id_namespaces_[id_namespaces::kNumIdNamespaces];
170 166
171 FeatureInfo::Ref feature_info_; 167 FeatureInfo::Ref feature_info_;
172 168
173 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 169 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
174 }; 170 };
175 171
176 } // namespace gles2 172 } // namespace gles2
177 } // namespace gpu 173 } // namespace gpu
178 174
179 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 175 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
180 176
181 177
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gl_mock.h ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698