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

Side by Side Diff: gpu/config/gpu_control_list.cc

Issue 1719113002: Fix GPU acceleration on Intel GMA* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix logic 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 | « no previous file | gpu/config/gpu_control_list_unittest.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) 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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
1156 candidates.push_back(gpu_info.secondary_gpus[ii]); 1156 candidates.push_back(gpu_info.secondary_gpus[ii]);
1157 } 1157 }
1158 if (candidates.empty())
1159 candidates.push_back(gpu_info.gpu);
1158 default: 1160 default:
1159 break; 1161 break;
1160 } 1162 }
1161 1163
1162 GPUInfo::GPUDevice gpu; 1164 GPUInfo::GPUDevice gpu;
1163 gpu.vendor_id = vendor_id_; 1165 gpu.vendor_id = vendor_id_;
1164 bool found = false; 1166 bool found = false;
1165 if (device_id_list_.empty()) { 1167 if (device_id_list_.empty()) {
1166 for (size_t ii = 0; ii < candidates.size(); ++ii) { 1168 for (size_t ii = 0; ii < candidates.size(); ++ii) {
1167 if (gpu.vendor_id == candidates[ii].vendor_id) { 1169 if (gpu.vendor_id == candidates[ii].vendor_id) {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 const std::string& feature_name, int feature_id) { 1585 const std::string& feature_name, int feature_id) {
1584 feature_map_[feature_name] = feature_id; 1586 feature_map_[feature_name] = feature_id;
1585 } 1587 }
1586 1588
1587 void GpuControlList::set_supports_feature_type_all(bool supported) { 1589 void GpuControlList::set_supports_feature_type_all(bool supported) {
1588 supports_feature_type_all_ = supported; 1590 supports_feature_type_all_ = supported;
1589 } 1591 }
1590 1592
1591 } // namespace gpu 1593 } // namespace gpu
1592 1594
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_control_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698