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

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

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | gpu/config/gpu_control_list.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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 Shader* shader = attached_shaders_[ii].get(); 775 Shader* shader = attached_shaders_[ii].get();
776 if (!shader) 776 if (!shader)
777 continue; 777 continue;
778 const sh::ShaderVariable* info = NULL; 778 const sh::ShaderVariable* info = NULL;
779 const sh::Uniform* uniform = shader->GetUniformInfo(name); 779 const sh::Uniform* uniform = shader->GetUniformInfo(name);
780 bool found = false; 780 bool found = false;
781 if (uniform) 781 if (uniform)
782 found = uniform->findInfoByMappedName(name, &info, original_name); 782 found = uniform->findInfoByMappedName(name, &info, original_name);
783 if (found) { 783 if (found) {
784 const std::string kArraySpec("[0]"); 784 const std::string kArraySpec("[0]");
785 if (info->arraySize > 0 && !EndsWith(name, kArraySpec, true)) { 785 if (info->arraySize > 0 &&
786 !base::EndsWith(name, kArraySpec, base::CompareCase::SENSITIVE)) {
786 *corrected_name = name + kArraySpec; 787 *corrected_name = name + kArraySpec;
787 *original_name += kArraySpec; 788 *original_name += kArraySpec;
788 } else { 789 } else {
789 *corrected_name = name; 790 *corrected_name = name;
790 } 791 }
791 *type = info->type; 792 *type = info->type;
792 *size = std::max(1u, info->arraySize); 793 *size = std::max(1u, info->arraySize);
793 return; 794 return;
794 } 795 }
795 } 796 }
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 DCHECK(program); 1746 DCHECK(program);
1746 program->ClearUniforms(&zero_); 1747 program->ClearUniforms(&zero_);
1747 } 1748 }
1748 1749
1749 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1750 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1750 return index + element * 0x10000; 1751 return index + element * 0x10000;
1751 } 1752 }
1752 1753
1753 } // namespace gles2 1754 } // namespace gles2
1754 } // namespace gpu 1755 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | gpu/config/gpu_control_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698