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

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

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « google_apis/drive/test_util.cc ('k') | ios/web/webui/web_ui_ios_data_source_impl.cc » ('j') | 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 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 && !base::EndsWith(name, kArraySpec, true)) { 844 if (info->arraySize > 0 &&
845 !base::EndsWith(name, kArraySpec, base::CompareCase::SENSITIVE)) {
845 *corrected_name = name + kArraySpec; 846 *corrected_name = name + kArraySpec;
846 *original_name += kArraySpec; 847 *original_name += kArraySpec;
847 } else { 848 } else {
848 *corrected_name = name; 849 *corrected_name = name;
849 } 850 }
850 *type = info->type; 851 *type = info->type;
851 *size = std::max(1u, info->arraySize); 852 *size = std::max(1u, info->arraySize);
852 return; 853 return;
853 } 854 }
854 } 855 }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 DCHECK(program); 1823 DCHECK(program);
1823 program->ClearUniforms(&zero_); 1824 program->ClearUniforms(&zero_);
1824 } 1825 }
1825 1826
1826 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1827 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1827 return index + element * 0x10000; 1828 return index + element * 0x10000;
1828 } 1829 }
1829 1830
1830 } // namespace gles2 1831 } // namespace gles2
1831 } // namespace gpu 1832 } // namespace gpu
OLDNEW
« no previous file with comments | « google_apis/drive/test_util.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