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

Side by Side Diff: gpu/command_buffer/service/shader_manager.cc

Issue 1696012: Added shader type to shader info. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
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 #include "gpu/command_buffer/service/shader_manager.h" 5 #include "gpu/command_buffer/service/shader_manager.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 7
8 namespace gpu { 8 namespace gpu {
9 namespace gles2 { 9 namespace gles2 {
10 10
11 void ShaderManager::CreateShaderInfo(GLuint client_id, GLuint service_id) { 11 void ShaderManager::CreateShaderInfo(GLuint client_id,
12 GLuint service_id,
13 GLenum shader_type) {
12 std::pair<ShaderInfoMap::iterator, bool> result = 14 std::pair<ShaderInfoMap::iterator, bool> result =
13 shader_infos_.insert(std::make_pair( 15 shader_infos_.insert(std::make_pair(
14 client_id, ShaderInfo::Ref(new ShaderInfo(service_id)))); 16 client_id, ShaderInfo::Ref(new ShaderInfo(service_id, shader_type))));
15 DCHECK(result.second); 17 DCHECK(result.second);
16 } 18 }
17 19
18 ShaderManager::ShaderInfo* ShaderManager::GetShaderInfo(GLuint client_id) { 20 ShaderManager::ShaderInfo* ShaderManager::GetShaderInfo(GLuint client_id) {
19 ShaderInfoMap::iterator it = shader_infos_.find(client_id); 21 ShaderInfoMap::iterator it = shader_infos_.find(client_id);
20 return it != shader_infos_.end() ? it->second : NULL; 22 return it != shader_infos_.end() ? it->second : NULL;
21 } 23 }
22 24
23 void ShaderManager::RemoveShaderInfo(GLuint client_id) { 25 void ShaderManager::RemoveShaderInfo(GLuint client_id) {
24 ShaderInfoMap::iterator it = shader_infos_.find(client_id); 26 ShaderInfoMap::iterator it = shader_infos_.find(client_id);
(...skipping 12 matching lines...) Expand all
37 return true; 39 return true;
38 } 40 }
39 } 41 }
40 return false; 42 return false;
41 } 43 }
42 44
43 } // namespace gles2 45 } // namespace gles2
44 } // namespace gpu 46 } // namespace gpu
45 47
46 48
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_manager.h ('k') | gpu/command_buffer/service/shader_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698