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

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

Issue 7765013: Revert 98504 - Manually merging trunk revs 95836 and 96904 to 835 branch (second attempt) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 years, 3 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/id_allocator.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
(...skipping 18 matching lines...) Expand all
29 class ShaderManager; 29 class ShaderManager;
30 class TextureManager; 30 class TextureManager;
31 struct DisallowedExtensions; 31 struct DisallowedExtensions;
32 32
33 // A Context Group helps manage multiple GLES2Decoders that share 33 // A Context Group helps manage multiple GLES2Decoders that share
34 // resources. 34 // resources.
35 class ContextGroup : public base::RefCounted<ContextGroup> { 35 class ContextGroup : public base::RefCounted<ContextGroup> {
36 public: 36 public:
37 typedef scoped_refptr<ContextGroup> Ref; 37 typedef scoped_refptr<ContextGroup> Ref;
38 38
39 explicit ContextGroup(bool bind_generates_resource); 39 ContextGroup();
40 ~ContextGroup(); 40 ~ContextGroup();
41 41
42 // This should only be called by GLES2Decoder. 42 // This should only be called by GLES2Decoder.
43 bool Initialize(const DisallowedExtensions& disallowed_extensions, 43 bool Initialize(const DisallowedExtensions& disallowed_extensions,
44 const char* allowed_features); 44 const char* allowed_features);
45 45
46 // Sets the ContextGroup has having a lost context. 46 // Sets the ContextGroup has having a lost context.
47 void set_have_context(bool have_context) { 47 void set_have_context(bool have_context) {
48 have_context_ = have_context; 48 have_context_ = have_context;
49 } 49 }
50 50
51 bool bind_generates_resource() {
52 return bind_generates_resource_;
53 }
54
55 uint32 max_vertex_attribs() const { 51 uint32 max_vertex_attribs() const {
56 return max_vertex_attribs_; 52 return max_vertex_attribs_;
57 } 53 }
58 54
59 uint32 max_texture_units() const { 55 uint32 max_texture_units() const {
60 return max_texture_units_; 56 return max_texture_units_;
61 } 57 }
62 58
63 uint32 max_texture_image_units() const { 59 uint32 max_texture_image_units() const {
64 return max_texture_image_units_; 60 return max_texture_image_units_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 106
111 IdAllocatorInterface* GetIdAllocator(unsigned namespace_id); 107 IdAllocatorInterface* GetIdAllocator(unsigned namespace_id);
112 108
113 private: 109 private:
114 // Destroys all the resources. 110 // Destroys all the resources.
115 void Destroy(); 111 void Destroy();
116 112
117 // Whether or not this context is initialized. 113 // Whether or not this context is initialized.
118 bool initialized_; 114 bool initialized_;
119 bool have_context_; 115 bool have_context_;
120 bool bind_generates_resource_;
121 116
122 uint32 max_vertex_attribs_; 117 uint32 max_vertex_attribs_;
123 uint32 max_texture_units_; 118 uint32 max_texture_units_;
124 uint32 max_texture_image_units_; 119 uint32 max_texture_image_units_;
125 uint32 max_vertex_texture_image_units_; 120 uint32 max_vertex_texture_image_units_;
126 uint32 max_fragment_uniform_vectors_; 121 uint32 max_fragment_uniform_vectors_;
127 uint32 max_varying_vectors_; 122 uint32 max_varying_vectors_;
128 uint32 max_vertex_uniform_vectors_; 123 uint32 max_vertex_uniform_vectors_;
129 124
130 scoped_ptr<BufferManager> buffer_manager_; 125 scoped_ptr<BufferManager> buffer_manager_;
(...skipping 15 matching lines...) Expand all
146 141
147 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 142 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
148 }; 143 };
149 144
150 } // namespace gles2 145 } // namespace gles2
151 } // namespace gpu 146 } // namespace gpu
152 147
153 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 148 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
154 149
155 150
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/id_allocator.h ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698