| OLD | NEW |
| 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/config/gpu_test_config.h" | 5 #include "gpu/config/gpu_test_config.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "gpu/config/gpu_info.h" | 9 #include "gpu/config/gpu_info.h" |
| 10 #include "gpu/config/gpu_info_collector.h" | 10 #include "gpu/config/gpu_info_collector.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 if (!parser.ParseConfig(config_data, &config)) | 227 if (!parser.ParseConfig(config_data, &config)) |
| 228 return false; | 228 return false; |
| 229 return Matches(config); | 229 return Matches(config); |
| 230 } | 230 } |
| 231 | 231 |
| 232 bool GPUTestBotConfig::LoadCurrentConfig(const GPUInfo* gpu_info) { | 232 bool GPUTestBotConfig::LoadCurrentConfig(const GPUInfo* gpu_info) { |
| 233 bool rt; | 233 bool rt; |
| 234 if (gpu_info == NULL) { | 234 if (gpu_info == NULL) { |
| 235 GPUInfo my_gpu_info; | 235 GPUInfo my_gpu_info; |
| 236 GpuIDResult result; | 236 CollectInfoResult result = CollectGpuID( |
| 237 result = CollectGpuID(&my_gpu_info.gpu.vendor_id, | 237 &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id); |
| 238 &my_gpu_info.gpu.device_id); | 238 if (result != kCollectInfoSuccess) { |
| 239 if (result == kGpuIDNotSupported) { | |
| 240 LOG(ERROR) << "Fail to identify GPU"; | 239 LOG(ERROR) << "Fail to identify GPU"; |
| 241 DisableGPUInfoValidation(); | 240 DisableGPUInfoValidation(); |
| 242 rt = true; | 241 rt = true; |
| 243 } else { | 242 } else { |
| 244 rt = SetGPUInfo(my_gpu_info); | 243 rt = SetGPUInfo(my_gpu_info); |
| 245 } | 244 } |
| 246 } else { | 245 } else { |
| 247 rt = SetGPUInfo(*gpu_info); | 246 rt = SetGPUInfo(*gpu_info); |
| 248 } | 247 } |
| 249 set_os(GetCurrentOS()); | 248 set_os(GetCurrentOS()); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // Blacklist rule #79 disables all Gpu acceleration before Windows 7. | 290 // Blacklist rule #79 disables all Gpu acceleration before Windows 7. |
| 292 if (base::win::GetVersion() <= base::win::VERSION_VISTA) { | 291 if (base::win::GetVersion() <= base::win::VERSION_VISTA) { |
| 293 return true; | 292 return true; |
| 294 } | 293 } |
| 295 #endif | 294 #endif |
| 296 return false; | 295 return false; |
| 297 } | 296 } |
| 298 | 297 |
| 299 } // namespace gpu | 298 } // namespace gpu |
| 300 | 299 |
| OLD | NEW |