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 "content/test/gpu/gpu_test_config.h" | 5 #include "content/test/gpu/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 "content/gpu/gpu_info_collector.h" | 9 #include "content/gpu/gpu_info_collector.h" |
10 #include "content/public/common/gpu_info.h" | 10 #include "content/public/common/gpu_info.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 if (!parser.ParseConfig(config_data, &config)) | 206 if (!parser.ParseConfig(config_data, &config)) |
207 return false; | 207 return false; |
208 return Matches(config); | 208 return Matches(config); |
209 } | 209 } |
210 | 210 |
211 bool GPUTestBotConfig::LoadCurrentConfig(const content::GPUInfo* gpu_info) { | 211 bool GPUTestBotConfig::LoadCurrentConfig(const content::GPUInfo* gpu_info) { |
212 bool rt; | 212 bool rt; |
213 if (gpu_info == NULL) { | 213 if (gpu_info == NULL) { |
214 content::GPUInfo my_gpu_info; | 214 content::GPUInfo my_gpu_info; |
215 gpu_info_collector::CollectBasicGraphicsInfo(&my_gpu_info); | 215 gpu_info_collector::CollectPreliminaryGraphicsInfo(&my_gpu_info); |
216 rt = SetGPUInfo(my_gpu_info); | 216 rt = SetGPUInfo(my_gpu_info); |
217 } else { | 217 } else { |
218 rt = SetGPUInfo(*gpu_info); | 218 rt = SetGPUInfo(*gpu_info); |
219 } | 219 } |
220 set_os(GetCurrentOS()); | 220 set_os(GetCurrentOS()); |
221 if (os() == kOsUnknown) | 221 if (os() == kOsUnknown) |
222 rt = false; | 222 rt = false; |
223 #if defined(NDEBUG) | 223 #if defined(NDEBUG) |
224 set_build_type(kBuildTypeRelease); | 224 set_build_type(kBuildTypeRelease); |
225 #else | 225 #else |
(...skipping 16 matching lines...) Expand all Loading... |
242 GPUTestBotConfig my_config; | 242 GPUTestBotConfig my_config; |
243 if (!my_config.LoadCurrentConfig(NULL)) | 243 if (!my_config.LoadCurrentConfig(NULL)) |
244 return false; | 244 return false; |
245 for (size_t i = 0 ; i < configs.size(); ++i) { | 245 for (size_t i = 0 ; i < configs.size(); ++i) { |
246 if (my_config.Matches(configs[i])) | 246 if (my_config.Matches(configs[i])) |
247 return true; | 247 return true; |
248 } | 248 } |
249 return false; | 249 return false; |
250 } | 250 } |
251 | 251 |
OLD | NEW |