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

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, 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
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 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 DCHECK(program); 2367 DCHECK(program);
2365 program->ClearUniforms(&zero_); 2368 program->ClearUniforms(&zero_);
2366 } 2369 }
2367 2370
2368 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { 2371 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) {
2369 return index + element * 0x10000; 2372 return index + element * 0x10000;
2370 } 2373 }
2371 2374
2372 } // namespace gles2 2375 } // namespace gles2
2373 } // namespace gpu 2376 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.h ('k') | gpu/command_buffer/service/sync_point_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698