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

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

Issue 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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/service/BUILD.gn ('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 <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class IdAllocatorInterface; 24 class IdAllocatorInterface;
25 class TransferBufferManagerInterface; 25 class TransferBufferManagerInterface;
26 26
27 namespace gles2 { 27 namespace gles2 {
28 28
29 class ProgramCache; 29 class ProgramCache;
30 class BufferManager; 30 class BufferManager;
31 class GLES2Decoder; 31 class GLES2Decoder;
32 class FramebufferManager; 32 class FramebufferManager;
33 class ImageManager;
34 class MailboxManager; 33 class MailboxManager;
35 class RenderbufferManager; 34 class RenderbufferManager;
36 class ProgramManager; 35 class ProgramManager;
37 class ShaderManager; 36 class ShaderManager;
38 class TextureManager; 37 class TextureManager;
39 class MemoryTracker; 38 class MemoryTracker;
40 struct DisallowedFeatures; 39 struct DisallowedFeatures;
41 40
42 // A Context Group helps manage multiple GLES2Decoders that share 41 // A Context Group helps manage multiple GLES2Decoders that share
43 // resources. 42 // resources.
44 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { 43 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
45 public: 44 public:
46 ContextGroup( 45 ContextGroup(
47 MailboxManager* mailbox_manager, 46 MailboxManager* mailbox_manager,
48 ImageManager* image_manager,
49 MemoryTracker* memory_tracker, 47 MemoryTracker* memory_tracker,
50 ShaderTranslatorCache* shader_translator_cache, 48 ShaderTranslatorCache* shader_translator_cache,
51 FeatureInfo* feature_info, 49 FeatureInfo* feature_info,
52 bool bind_generates_resource); 50 bool bind_generates_resource);
53 51
54 // This should only be called by GLES2Decoder. This must be paired with a 52 // This should only be called by GLES2Decoder. This must be paired with a
55 // call to destroy if it succeeds. 53 // call to destroy if it succeeds.
56 bool Initialize( 54 bool Initialize(
57 GLES2Decoder* decoder, 55 GLES2Decoder* decoder,
58 const DisallowedFeatures& disallowed_features); 56 const DisallowedFeatures& disallowed_features);
59 57
60 // Destroys all the resources when called for the last context in the group. 58 // Destroys all the resources when called for the last context in the group.
61 // It should only be called by GLES2Decoder. 59 // It should only be called by GLES2Decoder.
62 void Destroy(GLES2Decoder* decoder, bool have_context); 60 void Destroy(GLES2Decoder* decoder, bool have_context);
63 61
64 MailboxManager* mailbox_manager() const { 62 MailboxManager* mailbox_manager() const {
65 return mailbox_manager_.get(); 63 return mailbox_manager_.get();
66 } 64 }
67 65
68 ImageManager* image_manager() const {
69 return image_manager_.get();
70 }
71
72 MemoryTracker* memory_tracker() const { 66 MemoryTracker* memory_tracker() const {
73 return memory_tracker_.get(); 67 return memory_tracker_.get();
74 } 68 }
75 69
76 ShaderTranslatorCache* shader_translator_cache() const { 70 ShaderTranslatorCache* shader_translator_cache() const {
77 return shader_translator_cache_.get(); 71 return shader_translator_cache_.get();
78 } 72 }
79 73
80 bool bind_generates_resource() { 74 bool bind_generates_resource() {
81 return bind_generates_resource_; 75 return bind_generates_resource_;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 friend class base::RefCounted<ContextGroup>; 170 friend class base::RefCounted<ContextGroup>;
177 ~ContextGroup(); 171 ~ContextGroup();
178 172
179 bool CheckGLFeature(GLint min_required, GLint* v); 173 bool CheckGLFeature(GLint min_required, GLint* v);
180 bool CheckGLFeatureU(GLint min_required, uint32* v); 174 bool CheckGLFeatureU(GLint min_required, uint32* v);
181 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v); 175 bool QueryGLFeature(GLenum pname, GLint min_required, GLint* v);
182 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); 176 bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v);
183 bool HaveContexts(); 177 bool HaveContexts();
184 178
185 scoped_refptr<MailboxManager> mailbox_manager_; 179 scoped_refptr<MailboxManager> mailbox_manager_;
186 scoped_refptr<ImageManager> image_manager_;
187 scoped_refptr<MemoryTracker> memory_tracker_; 180 scoped_refptr<MemoryTracker> memory_tracker_;
188 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; 181 scoped_refptr<ShaderTranslatorCache> shader_translator_cache_;
189 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; 182 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
190 183
191 bool enforce_gl_minimums_; 184 bool enforce_gl_minimums_;
192 bool bind_generates_resource_; 185 bool bind_generates_resource_;
193 186
194 uint32 max_vertex_attribs_; 187 uint32 max_vertex_attribs_;
195 uint32 max_texture_units_; 188 uint32 max_texture_units_;
196 uint32 max_texture_image_units_; 189 uint32 max_texture_image_units_;
(...skipping 29 matching lines...) Expand all
226 219
227 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 220 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
228 }; 221 };
229 222
230 } // namespace gles2 223 } // namespace gles2
231 } // namespace gpu 224 } // namespace gpu
232 225
233 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 226 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
234 227
235 228
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/BUILD.gn ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698