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

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

Issue 10828013: Removed dead code in program_manager.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I'd mistakenly removed code that needed to be there. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 GLint index = 0; 76 GLint index = 0;
77 size_t last = name.size() - 1; 77 size_t last = name.size() - 1;
78 for (size_t pos = open_pos + 1; pos < last; ++pos) { 78 for (size_t pos = open_pos + 1; pos < last; ++pos) {
79 int8 digit = name[pos] - '0'; 79 int8 digit = name[pos] - '0';
80 if (digit < 0 || digit > 9) { 80 if (digit < 0 || digit > 9) {
81 return false; 81 return false;
82 } 82 }
83 index = index * 10 + digit; 83 index = index * 10 + digit;
84 } 84 }
85 85
86 if (index < 0) {
87 return false;
88 }
89
90 *element_index = index; 86 *element_index = index;
91 *new_name = name.substr(0, open_pos); 87 *new_name = name.substr(0, open_pos);
92 return true; 88 return true;
93 } 89 }
94 90
95 } // anonymous namespace. 91 } // anonymous namespace.
96 92
97 ProgramManager::ProgramInfo::UniformInfo::UniformInfo() 93 ProgramManager::ProgramInfo::UniformInfo::UniformInfo()
98 : size(0) { 94 : size(0) {
99 } 95 }
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 } 1112 }
1117 1113
1118 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1114 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1119 return index + element * 0x10000; 1115 return index + element * 0x10000;
1120 } 1116 }
1121 1117
1122 } // namespace gles2 1118 } // namespace gles2
1123 } // namespace gpu 1119 } // namespace gpu
1124 1120
1125 1121
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698