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

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

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 Shader* shader = attached_shaders_[ii].get(); 834 Shader* shader = attached_shaders_[ii].get();
835 if (!shader) 835 if (!shader)
836 continue; 836 continue;
837 const sh::ShaderVariable* info = NULL; 837 const sh::ShaderVariable* info = NULL;
838 const sh::Uniform* uniform = shader->GetUniformInfo(name); 838 const sh::Uniform* uniform = shader->GetUniformInfo(name);
839 bool found = false; 839 bool found = false;
840 if (uniform) 840 if (uniform)
841 found = uniform->findInfoByMappedName(name, &info, original_name); 841 found = uniform->findInfoByMappedName(name, &info, original_name);
842 if (found) { 842 if (found) {
843 const std::string kArraySpec("[0]"); 843 const std::string kArraySpec("[0]");
844 if (info->arraySize > 0 && !EndsWith(name, kArraySpec, true)) { 844 if (info->arraySize > 0 && !base::EndsWith(name, kArraySpec, true)) {
845 *corrected_name = name + kArraySpec; 845 *corrected_name = name + kArraySpec;
846 *original_name += kArraySpec; 846 *original_name += kArraySpec;
847 } else { 847 } else {
848 *corrected_name = name; 848 *corrected_name = name;
849 } 849 }
850 *type = info->type; 850 *type = info->type;
851 *size = std::max(1u, info->arraySize); 851 *size = std::max(1u, info->arraySize);
852 return; 852 return;
853 } 853 }
854 } 854 }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 DCHECK(program); 1822 DCHECK(program);
1823 program->ClearUniforms(&zero_); 1823 program->ClearUniforms(&zero_);
1824 } 1824 }
1825 1825
1826 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1826 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1827 return index + element * 0x10000; 1827 return index + element * 0x10000;
1828 } 1828 }
1829 1829
1830 } // namespace gles2 1830 } // namespace gles2
1831 } // namespace gpu 1831 } // namespace gpu
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher_unittest.cc ('k') | ios/web/webui/web_ui_ios_data_source_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698