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

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

Issue 780133002: Add optimization for CHROMIUM_subscribe_uniform extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez@ review Created 6 years 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
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 <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.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/gles2_cmd_format.h" 16 #include "gpu/command_buffer/common/gles2_cmd_format.h"
17 #include "gpu/command_buffer/service/feature_info.h" 17 #include "gpu/command_buffer/service/feature_info.h"
18 #include "gpu/command_buffer/service/gles2_cmd_validation.h" 18 #include "gpu/command_buffer/service/gles2_cmd_validation.h"
19 #include "gpu/command_buffer/service/shader_translator_cache.h" 19 #include "gpu/command_buffer/service/shader_translator_cache.h"
20 #include "gpu/gpu_export.h" 20 #include "gpu/gpu_export.h"
21 #include "ipc/ipc_sender.h"
22
23 namespace content {
24 class GpuChannel;
25 }
piman 2014/12/05 21:04:36 Are those 5 lines leftover from a previous version
orglofch 2014/12/06 21:49:04 Yep, Done.
21 26
22 namespace gpu { 27 namespace gpu {
23 28
24 class TransferBufferManagerInterface; 29 class TransferBufferManagerInterface;
25 class ValueStateMap; 30 class ValueStateMap;
26 31
27 namespace gles2 { 32 namespace gles2 {
28 33
29 class ProgramCache; 34 class ProgramCache;
30 class BufferManager; 35 class BufferManager;
31 class GLES2Decoder; 36 class GLES2Decoder;
32 class FramebufferManager; 37 class FramebufferManager;
33 class MailboxManager; 38 class MailboxManager;
34 class RenderbufferManager; 39 class RenderbufferManager;
35 class ProgramManager; 40 class ProgramManager;
36 class ShaderManager; 41 class ShaderManager;
37 class TextureManager; 42 class TextureManager;
43 class SubscriptionRefSet;
38 class ValuebufferManager; 44 class ValuebufferManager;
39 class MemoryTracker; 45 class MemoryTracker;
40 struct DisallowedFeatures; 46 struct DisallowedFeatures;
41 47
42 // A Context Group helps manage multiple GLES2Decoders that share 48 // A Context Group helps manage multiple GLES2Decoders that share
43 // resources. 49 // resources.
44 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { 50 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
45 public: 51 public:
46 ContextGroup( 52 ContextGroup(
47 const scoped_refptr<MailboxManager>& mailbox_manager, 53 const scoped_refptr<MailboxManager>& mailbox_manager,
48 const scoped_refptr<MemoryTracker>& memory_tracker, 54 const scoped_refptr<MemoryTracker>& memory_tracker,
49 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, 55 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
50 const scoped_refptr<FeatureInfo>& feature_info, 56 const scoped_refptr<FeatureInfo>& feature_info,
57 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set,
51 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, 58 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state,
52 bool bind_generates_resource); 59 bool bind_generates_resource);
53 60
54 // This should only be called by GLES2Decoder. This must be paired with a 61 // This should only be called by GLES2Decoder. This must be paired with a
55 // call to destroy if it succeeds. 62 // call to destroy if it succeeds.
56 bool Initialize( 63 bool Initialize(
57 GLES2Decoder* decoder, 64 GLES2Decoder* decoder,
58 const DisallowedFeatures& disallowed_features); 65 const DisallowedFeatures& disallowed_features);
59 66
60 // Destroys all the resources when called for the last context in the group. 67 // Destroys all the resources when called for the last context in the group.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 bool CheckGLFeature(GLint min_required, GLint* v); 188 bool CheckGLFeature(GLint min_required, GLint* v);
182 bool CheckGLFeatureU(GLint min_required, uint32* v); 189 bool CheckGLFeatureU(GLint min_required, uint32* v);
183 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v); 190 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v);
184 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); 191 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v);
185 bool HaveContexts(); 192 bool HaveContexts();
186 193
187 scoped_refptr<MailboxManager> mailbox_manager_; 194 scoped_refptr<MailboxManager> mailbox_manager_;
188 scoped_refptr<MemoryTracker> memory_tracker_; 195 scoped_refptr<MemoryTracker> memory_tracker_;
189 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; 196 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_;
190 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; 197 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
191 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; 198 scoped_refptr<SubscriptionRefSet> subscription_ref_set_;
199 scoped_refptr<ValueStateMap> pending_valuebuffer_state_;
192 200
193 bool enforce_gl_minimums_; 201 bool enforce_gl_minimums_;
194 bool bind_generates_resource_; 202 bool bind_generates_resource_;
195 203
196 uint32 max_vertex_attribs_; 204 uint32 max_vertex_attribs_;
197 uint32 max_texture_units_; 205 uint32 max_texture_units_;
198 uint32 max_texture_image_units_; 206 uint32 max_texture_image_units_;
199 uint32 max_vertex_texture_image_units_; 207 uint32 max_vertex_texture_image_units_;
200 uint32 max_fragment_uniform_vectors_; 208 uint32 max_fragment_uniform_vectors_;
201 uint32 max_varying_vectors_; 209 uint32 max_varying_vectors_;
(...skipping 25 matching lines...) Expand all
227 235
228 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 236 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
229 }; 237 };
230 238
231 } // namespace gles2 239 } // namespace gles2
232 } // namespace gpu 240 } // namespace gpu
233 241
234 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 242 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
235 243
236 244
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698