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

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

Issue 1725113002: gpu: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 NOTREACHED() << "Unhandled UniformInfo type " << type; 244 NOTREACHED() << "Unhandled UniformInfo type " << type;
245 break; 245 break;
246 } 246 }
247 DCHECK_LT(0, size); 247 DCHECK_LT(0, size);
248 DCHECK(is_array || size == 1); 248 DCHECK(is_array || size == 1);
249 249
250 size_t num_texture_units = IsSampler() ? static_cast<size_t>(size) : 0u; 250 size_t num_texture_units = IsSampler() ? static_cast<size_t>(size) : 0u;
251 texture_units.clear(); 251 texture_units.clear();
252 texture_units.resize(num_texture_units, 0); 252 texture_units.resize(num_texture_units, 0);
253 } 253 }
254
255 Program::UniformInfo::UniformInfo(const UniformInfo& other) = default;
256
254 Program::UniformInfo::~UniformInfo() {} 257 Program::UniformInfo::~UniformInfo() {}
255 258
256 bool ProgramManager::HasBuiltInPrefix(const std::string& name) { 259 bool ProgramManager::HasBuiltInPrefix(const std::string& name) {
257 return name.length() >= 3 && name[0] == 'g' && name[1] == 'l' && 260 return name.length() >= 3 && name[0] == 'g' && name[1] == 'l' &&
258 name[2] == '_'; 261 name[2] == '_';
259 } 262 }
260 263
261 Program::Program(ProgramManager* manager, GLuint service_id) 264 Program::Program(ProgramManager* manager, GLuint service_id)
262 : manager_(manager), 265 : manager_(manager),
263 use_count_(0), 266 use_count_(0),
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 DCHECK(program); 2383 DCHECK(program);
2381 program->ClearUniforms(&zero_); 2384 program->ClearUniforms(&zero_);
2382 } 2385 }
2383 2386
2384 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { 2387 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) {
2385 return index + element * 0x10000; 2388 return index + element * 0x10000;
2386 } 2389 }
2387 2390
2388 } // namespace gles2 2391 } // namespace gles2
2389 } // namespace gpu 2392 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698