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

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

Issue 6713127: Initialize a few uninitialized members in GPU classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 NOTREACHED(); 25 NOTREACHED();
26 return 0; 26 return 0;
27 } 27 }
28 } 28 }
29 29
30 ProgramManager::ProgramInfo::UniformInfo::UniformInfo(GLsizei _size, 30 ProgramManager::ProgramInfo::UniformInfo::UniformInfo(GLsizei _size,
31 GLenum _type, 31 GLenum _type,
32 const std::string& _name) 32 const std::string& _name)
33 : size(_size), 33 : size(_size),
34 type(_type), 34 type(_type),
35 is_array(false),
35 name(_name) { 36 name(_name) {
36 } 37 }
37 38
38 ProgramManager::ProgramInfo::UniformInfo::~UniformInfo() {} 39 ProgramManager::ProgramInfo::UniformInfo::~UniformInfo() {}
39 40
40 bool ProgramManager::IsInvalidPrefix(const char* name, size_t length) { 41 bool ProgramManager::IsInvalidPrefix(const char* name, size_t length) {
41 static const char kInvalidPrefix[] = { 'g', 'l', '_' }; 42 static const char kInvalidPrefix[] = { 'g', 'l', '_' };
42 return (length >= sizeof(kInvalidPrefix) && 43 return (length >= sizeof(kInvalidPrefix) &&
43 memcmp(name, kInvalidPrefix, sizeof(kInvalidPrefix)) == 0); 44 memcmp(name, kInvalidPrefix, sizeof(kInvalidPrefix)) == 0);
44 } 45 }
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 DCHECK(info); 506 DCHECK(info);
506 DCHECK(IsOwned(info)); 507 DCHECK(IsOwned(info));
507 info->DecUseCount(); 508 info->DecUseCount();
508 RemoveProgramInfoIfUnused(shader_manager, info); 509 RemoveProgramInfoIfUnused(shader_manager, info);
509 } 510 }
510 511
511 } // namespace gles2 512 } // namespace gles2
512 } // namespace gpu 513 } // namespace gpu
513 514
514 515
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698