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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 *element_index = index; | 90 *element_index = index; |
91 *new_name = name.substr(0, open_pos); | 91 *new_name = name.substr(0, open_pos); |
92 return true; | 92 return true; |
93 } | 93 } |
94 | 94 |
95 } // anonymous namespace. | 95 } // anonymous namespace. |
96 | 96 |
97 ProgramManager::ProgramInfo::UniformInfo::UniformInfo() | 97 ProgramManager::ProgramInfo::UniformInfo::UniformInfo() |
98 : size(0) { | 98 : size(0), |
| 99 type(GL_NONE), |
| 100 fake_location_base(0), |
| 101 is_array(false) { |
99 } | 102 } |
100 | 103 |
101 ProgramManager::ProgramInfo::UniformInfo::UniformInfo( | 104 ProgramManager::ProgramInfo::UniformInfo::UniformInfo( |
102 GLsizei _size, | 105 GLsizei _size, |
103 GLenum _type, | 106 GLenum _type, |
104 int _fake_location_base, | 107 int _fake_location_base, |
105 const std::string& _name) | 108 const std::string& _name) |
106 : size(_size), | 109 : size(_size), |
107 type(_type), | 110 type(_type), |
108 fake_location_base(_fake_location_base), | 111 fake_location_base(_fake_location_base), |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 default: | 233 default: |
231 NOTREACHED(); | 234 NOTREACHED(); |
232 break; | 235 break; |
233 } | 236 } |
234 } | 237 } |
235 } | 238 } |
236 | 239 |
237 namespace { | 240 namespace { |
238 | 241 |
239 struct UniformData { | 242 struct UniformData { |
240 UniformData() : size(-1), type(GL_NONE), added(false) { | 243 UniformData() : size(-1), type(GL_NONE), location(0), added(false) { |
241 } | 244 } |
242 std::string queried_name; | 245 std::string queried_name; |
243 std::string corrected_name; | 246 std::string corrected_name; |
244 std::string original_name; | 247 std::string original_name; |
245 GLsizei size; | 248 GLsizei size; |
246 GLenum type; | 249 GLenum type; |
247 GLint location; | 250 GLint location; |
248 bool added; | 251 bool added; |
249 }; | 252 }; |
250 | 253 |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 } | 1119 } |
1117 | 1120 |
1118 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { | 1121 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { |
1119 return index + element * 0x10000; | 1122 return index + element * 0x10000; |
1120 } | 1123 } |
1121 | 1124 |
1122 } // namespace gles2 | 1125 } // namespace gles2 |
1123 } // namespace gpu | 1126 } // namespace gpu |
1124 | 1127 |
1125 | 1128 |
OLD | NEW |