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

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

Issue 2689006: Refactor validation code so it can be modified at runtime.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gl_utils.h » ('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) 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 "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/linked_ptr.h" 10 #include "base/linked_ptr.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "gpu/command_buffer/service/gles2_cmd_validation.h"
12 13
13 namespace gpu { 14 namespace gpu {
14 15
15 class IdAllocator; 16 class IdAllocator;
16 17
17 namespace gles2 { 18 namespace gles2 {
18 19
19 class GLES2Decoder; 20 class GLES2Decoder;
20 class BufferManager; 21 class BufferManager;
21 class FramebufferManager; 22 class FramebufferManager;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 ProgramManager* program_manager() const { 82 ProgramManager* program_manager() const {
82 return program_manager_.get(); 83 return program_manager_.get();
83 } 84 }
84 85
85 ShaderManager* shader_manager() const { 86 ShaderManager* shader_manager() const {
86 return shader_manager_.get(); 87 return shader_manager_.get();
87 } 88 }
88 89
89 IdAllocator* GetIdAllocator(unsigned namepsace_id); 90 IdAllocator* GetIdAllocator(unsigned namepsace_id);
90 91
92 const Validators* validators() const {
93 return &validators_;
94 }
95
91 private: 96 private:
92 // Whether or not this context is initialized. 97 // Whether or not this context is initialized.
93 bool initialized_; 98 bool initialized_;
94 99
95 uint32 max_vertex_attribs_; 100 uint32 max_vertex_attribs_;
96 uint32 max_texture_units_; 101 uint32 max_texture_units_;
97 uint32 max_texture_image_units_; 102 uint32 max_texture_image_units_;
98 uint32 max_vertex_texture_image_units_; 103 uint32 max_vertex_texture_image_units_;
99 uint32 max_fragment_uniform_vectors_; 104 uint32 max_fragment_uniform_vectors_;
100 uint32 max_varying_vectors_; 105 uint32 max_varying_vectors_;
101 uint32 max_vertex_uniform_vectors_; 106 uint32 max_vertex_uniform_vectors_;
102 107
103 scoped_ptr<BufferManager> buffer_manager_; 108 scoped_ptr<BufferManager> buffer_manager_;
104 109
105 scoped_ptr<FramebufferManager> framebuffer_manager_; 110 scoped_ptr<FramebufferManager> framebuffer_manager_;
106 111
107 scoped_ptr<RenderbufferManager> renderbuffer_manager_; 112 scoped_ptr<RenderbufferManager> renderbuffer_manager_;
108 113
109 scoped_ptr<TextureManager> texture_manager_; 114 scoped_ptr<TextureManager> texture_manager_;
110 115
111 scoped_ptr<ProgramManager> program_manager_; 116 scoped_ptr<ProgramManager> program_manager_;
112 117
113 scoped_ptr<ShaderManager> shader_manager_; 118 scoped_ptr<ShaderManager> shader_manager_;
114 119
115 typedef std::map<uint32, linked_ptr<IdAllocator> > IdAllocatorMap; 120 typedef std::map<uint32, linked_ptr<IdAllocator> > IdAllocatorMap;
116 IdAllocatorMap id_namespaces_; 121 IdAllocatorMap id_namespaces_;
117 122
123 Validators validators_;
124
118 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 125 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
119 }; 126 };
120 127
121 } // namespace gles2 128 } // namespace gles2
122 } // namespace gpu 129 } // namespace gpu
123 130
124 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 131 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
125 132
126 133
OLDNEW
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gl_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698