OLD | NEW |
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/program_manager.h" | 5 #include "gpu/command_buffer/service/program_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 Program::UniformInfo::~UniformInfo() {} | 188 Program::UniformInfo::~UniformInfo() {} |
189 | 189 |
190 bool ProgramManager::IsInvalidPrefix(const char* name, size_t length) { | 190 bool ProgramManager::IsInvalidPrefix(const char* name, size_t length) { |
191 static const char kInvalidPrefix[] = { 'g', 'l', '_' }; | 191 static const char kInvalidPrefix[] = { 'g', 'l', '_' }; |
192 return (length >= sizeof(kInvalidPrefix) && | 192 return (length >= sizeof(kInvalidPrefix) && |
193 memcmp(name, kInvalidPrefix, sizeof(kInvalidPrefix)) == 0); | 193 memcmp(name, kInvalidPrefix, sizeof(kInvalidPrefix)) == 0); |
194 } | 194 } |
195 | 195 |
196 Program::Program( | 196 Program::Program(ProgramManager* manager, GLuint service_id) |
197 ProgramManager* manager, GLuint service_id) | |
198 : manager_(manager), | 197 : manager_(manager), |
199 use_count_(0), | 198 use_count_(0), |
200 max_attrib_name_length_(0), | 199 max_attrib_name_length_(0), |
201 max_uniform_name_length_(0), | 200 max_uniform_name_length_(0), |
202 service_id_(service_id), | 201 service_id_(service_id), |
203 deleted_(false), | 202 deleted_(false), |
204 valid_(false), | 203 valid_(false), |
205 link_status_(false), | 204 link_status_(false), |
206 uniforms_cleared_(false), | 205 uniforms_cleared_(false), |
207 num_uniforms_(0) { | 206 num_uniforms_(0) { |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 DCHECK(program); | 1411 DCHECK(program); |
1413 program->ClearUniforms(&zero_); | 1412 program->ClearUniforms(&zero_); |
1414 } | 1413 } |
1415 | 1414 |
1416 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { | 1415 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { |
1417 return index + element * 0x10000; | 1416 return index + element * 0x10000; |
1418 } | 1417 } |
1419 | 1418 |
1420 } // namespace gles2 | 1419 } // namespace gles2 |
1421 } // namespace gpu | 1420 } // namespace gpu |
OLD | NEW |