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

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

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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 #include "gpu/command_buffer/service/shader_manager.h" 5 #include "gpu/command_buffer/service/shader_manager.h"
6
7 #include <utility>
8
9 #include "base/logging.h" 6 #include "base/logging.h"
10 #include "base/string_util.h" 7 #include "base/string_util.h"
11 8
12 namespace gpu { 9 namespace gpu {
13 namespace gles2 { 10 namespace gles2 {
14 11
15 ShaderManager::ShaderInfo::ShaderInfo(GLuint service_id, GLenum shader_type) 12 ShaderManager::ShaderInfo::ShaderInfo(GLuint service_id, GLenum shader_type)
16 : use_count_(0), 13 : use_count_(0),
17 service_id_(service_id), 14 service_id_(service_id),
18 shader_type_(shader_type), 15 shader_type_(shader_type),
19 valid_(false), 16 valid_(false) {
20 source_compiled_(false) {
21 } 17 }
22 18
23 ShaderManager::ShaderInfo::~ShaderInfo() { 19 ShaderManager::ShaderInfo::~ShaderInfo() {
24 } 20 }
25 21
26 void ShaderManager::ShaderInfo::IncUseCount() { 22 void ShaderManager::ShaderInfo::IncUseCount() {
27 ++use_count_; 23 ++use_count_;
28 } 24 }
29 25
30 void ShaderManager::ShaderInfo::DecUseCount() { 26 void ShaderManager::ShaderInfo::DecUseCount() {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 DCHECK(info); 159 DCHECK(info);
164 DCHECK(IsOwned(info)); 160 DCHECK(IsOwned(info));
165 info->DecUseCount(); 161 info->DecUseCount();
166 RemoveShaderInfoIfUnused(info); 162 RemoveShaderInfoIfUnused(info);
167 } 163 }
168 164
169 } // namespace gles2 165 } // namespace gles2
170 } // namespace gpu 166 } // namespace gpu
171 167
172 168
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