Index: gpu/command_buffer/service/program_manager.cc |
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc |
index d9ad80ef4c830297a458b10b8747c15847e88a2d..7210bdb5752d0f87e5e92e7f2d2bb8b4f0bc9477 100644 |
--- a/gpu/command_buffer/service/program_manager.cc |
+++ b/gpu/command_buffer/service/program_manager.cc |
@@ -204,7 +204,8 @@ const ProgramManager::ProgramInfo::UniformInfo* |
UniformInfo& info = uniform_infos_.back(); |
info.element_locations.resize(size); |
info.element_locations[0] = location; |
- size_t num_texture_units = info.IsSampler() ? size : 0u; |
+ DCHECK_GE(size, 0); |
+ size_t num_texture_units = info.IsSampler() ? static_cast<size_t>(size) : 0u; |
info.texture_units.clear(); |
info.texture_units.resize(num_texture_units, 0); |