Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/config/gpu_control_list.h" | 5 #include "gpu/config/gpu_control_list.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1145 candidates = gpu_info.secondary_gpus; | 1145 candidates = gpu_info.secondary_gpus; |
| 1146 break; | 1146 break; |
| 1147 case kMultiGpuCategoryAny: | 1147 case kMultiGpuCategoryAny: |
| 1148 candidates = gpu_info.secondary_gpus; | 1148 candidates = gpu_info.secondary_gpus; |
| 1149 candidates.push_back(gpu_info.gpu); | 1149 candidates.push_back(gpu_info.gpu); |
| 1150 break; | 1150 break; |
| 1151 case kMultiGpuCategoryActive: | 1151 case kMultiGpuCategoryActive: |
| 1152 if (gpu_info.gpu.active || gpu_info.secondary_gpus.empty()) | 1152 if (gpu_info.gpu.active || gpu_info.secondary_gpus.empty()) |
| 1153 candidates.push_back(gpu_info.gpu); | 1153 candidates.push_back(gpu_info.gpu); |
| 1154 for (size_t ii = 0; ii < gpu_info.secondary_gpus.size(); ++ii) { | 1154 for (size_t ii = 0; ii < gpu_info.secondary_gpus.size(); ++ii) { |
| 1155 if (gpu_info.secondary_gpus[ii].active) | 1155 if (gpu_info.secondary_gpus[ii].active || candidates.empty()) |
|
Zhenyao Mo
2016/02/22 17:05:21
This logic doesn't look right.
It should be after
| |
| 1156 candidates.push_back(gpu_info.secondary_gpus[ii]); | 1156 candidates.push_back(gpu_info.secondary_gpus[ii]); |
| 1157 } | 1157 } |
| 1158 default: | 1158 default: |
| 1159 break; | 1159 break; |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 GPUInfo::GPUDevice gpu; | 1162 GPUInfo::GPUDevice gpu; |
| 1163 gpu.vendor_id = vendor_id_; | 1163 gpu.vendor_id = vendor_id_; |
| 1164 bool found = false; | 1164 bool found = false; |
| 1165 if (device_id_list_.empty()) { | 1165 if (device_id_list_.empty()) { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1583 const std::string& feature_name, int feature_id) { | 1583 const std::string& feature_name, int feature_id) { |
| 1584 feature_map_[feature_name] = feature_id; | 1584 feature_map_[feature_name] = feature_id; |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 void GpuControlList::set_supports_feature_type_all(bool supported) { | 1587 void GpuControlList::set_supports_feature_type_all(bool supported) { |
| 1588 supports_feature_type_all_ = supported; | 1588 supports_feature_type_all_ = supported; |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 } // namespace gpu | 1591 } // namespace gpu |
| 1592 | 1592 |
| OLD | NEW |