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

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

Issue 10797055: gpu in-memory program cache implementation with a memory limit + lru eviction. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit fixes 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
« 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;
26 class BufferManager; 27 class BufferManager;
27 class GLES2Decoder; 28 class GLES2Decoder;
28 class FramebufferManager; 29 class FramebufferManager;
29 class MailboxManager; 30 class MailboxManager;
30 class RenderbufferManager; 31 class RenderbufferManager;
31 class ProgramManager; 32 class ProgramManager;
32 class ShaderManager; 33 class ShaderManager;
33 class TextureManager; 34 class TextureManager;
34 struct DisallowedFeatures; 35 struct DisallowedFeatures;
35 36
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 106 }
106 107
107 TextureManager* texture_manager() const { 108 TextureManager* texture_manager() const {
108 return texture_manager_.get(); 109 return texture_manager_.get();
109 } 110 }
110 111
111 ProgramManager* program_manager() const { 112 ProgramManager* program_manager() const {
112 return program_manager_.get(); 113 return program_manager_.get();
113 } 114 }
114 115
116 bool has_program_cache() const {
117 return program_cache_ != NULL;
118 }
119
120 void set_program_cache(ProgramCache* program_cache) {
121 program_cache_ = program_cache;
122 }
123
115 ShaderManager* shader_manager() const { 124 ShaderManager* shader_manager() const {
116 return shader_manager_.get(); 125 return shader_manager_.get();
117 } 126 }
118 127
119 TransferBufferManagerInterface* transfer_buffer_manager() const { 128 TransferBufferManagerInterface* transfer_buffer_manager() const {
120 return transfer_buffer_manager_.get(); 129 return transfer_buffer_manager_.get();
121 } 130 }
122 131
123 IdAllocatorInterface* GetIdAllocator(unsigned namespace_id); 132 IdAllocatorInterface* GetIdAllocator(unsigned namespace_id);
124 133
(...skipping 17 matching lines...) Expand all
142 bool bind_generates_resource_; 151 bool bind_generates_resource_;
143 152
144 uint32 max_vertex_attribs_; 153 uint32 max_vertex_attribs_;
145 uint32 max_texture_units_; 154 uint32 max_texture_units_;
146 uint32 max_texture_image_units_; 155 uint32 max_texture_image_units_;
147 uint32 max_vertex_texture_image_units_; 156 uint32 max_vertex_texture_image_units_;
148 uint32 max_fragment_uniform_vectors_; 157 uint32 max_fragment_uniform_vectors_;
149 uint32 max_varying_vectors_; 158 uint32 max_varying_vectors_;
150 uint32 max_vertex_uniform_vectors_; 159 uint32 max_vertex_uniform_vectors_;
151 160
161 ProgramCache* program_cache_;
162
152 scoped_ptr<BufferManager> buffer_manager_; 163 scoped_ptr<BufferManager> buffer_manager_;
153 164
154 scoped_ptr<FramebufferManager> framebuffer_manager_; 165 scoped_ptr<FramebufferManager> framebuffer_manager_;
155 166
156 scoped_ptr<RenderbufferManager> renderbuffer_manager_; 167 scoped_ptr<RenderbufferManager> renderbuffer_manager_;
157 168
158 scoped_ptr<TextureManager> texture_manager_; 169 scoped_ptr<TextureManager> texture_manager_;
159 170
160 scoped_ptr<ProgramManager> program_manager_; 171 scoped_ptr<ProgramManager> program_manager_;
161 172
162 scoped_ptr<ShaderManager> shader_manager_; 173 scoped_ptr<ShaderManager> shader_manager_;
163 174
164 linked_ptr<IdAllocatorInterface> 175 linked_ptr<IdAllocatorInterface>
165 id_namespaces_[id_namespaces::kNumIdNamespaces]; 176 id_namespaces_[id_namespaces::kNumIdNamespaces];
166 177
167 FeatureInfo::Ref feature_info_; 178 FeatureInfo::Ref feature_info_;
168 179
169 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 180 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
170 }; 181 };
171 182
172 } // namespace gles2 183 } // namespace gles2
173 } // namespace gpu 184 } // namespace gpu
174 185
175 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 186 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
176 187
177 188
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