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

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

Issue 6721010: Fix bug in shader and program managers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | « no previous file | gpu/command_buffer/service/program_manager.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) 2010 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_PROGRAM_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 // Marks a program as used. 241 // Marks a program as used.
242 void UseProgram(ProgramInfo* info); 242 void UseProgram(ProgramInfo* info);
243 243
244 // Makes a program as unused. If deleted the program info will be removed. 244 // Makes a program as unused. If deleted the program info will be removed.
245 void UnuseProgram(ShaderManager* shader_manager, ProgramInfo* info); 245 void UnuseProgram(ShaderManager* shader_manager, ProgramInfo* info);
246 246
247 // Returns true if prefix is invalid for gl. 247 // Returns true if prefix is invalid for gl.
248 static bool IsInvalidPrefix(const char* name, size_t length); 248 static bool IsInvalidPrefix(const char* name, size_t length);
249 249
250 // Check if a ProgramInfo is owned by this ProgramManager.
251 bool IsOwned(ProgramInfo* info);
252
250 private: 253 private:
251 // Info for each "successfully linked" program by service side program Id. 254 // Info for each "successfully linked" program by service side program Id.
252 // TODO(gman): Choose a faster container. 255 // TODO(gman): Choose a faster container.
253 typedef std::map<GLuint, ProgramInfo::Ref> ProgramInfoMap; 256 typedef std::map<GLuint, ProgramInfo::Ref> ProgramInfoMap;
254 ProgramInfoMap program_infos_; 257 ProgramInfoMap program_infos_;
255 258
256 void RemoveProgramInfoIfUnused( 259 void RemoveProgramInfoIfUnused(
257 ShaderManager* shader_manager, ProgramInfo* info); 260 ShaderManager* shader_manager, ProgramInfo* info);
258 261
259 DISALLOW_COPY_AND_ASSIGN(ProgramManager); 262 DISALLOW_COPY_AND_ASSIGN(ProgramManager);
260 }; 263 };
261 264
262 } // namespace gles2 265 } // namespace gles2
263 } // namespace gpu 266 } // namespace gpu
264 267
265 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 268 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698