| Index: content/browser/gpu/gpu_data_manager_impl_private.cc
|
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| index 0a07e936bf5bbc23c5cc6c6b4d860352593d1de8..6183369b8ee018faa59326654f4d721fa19d8533 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -477,6 +477,7 @@ void GpuDataManagerImplPrivate::SetGLStrings(const std::string& gl_vendor,
|
| gpu_info.gl_version = gl_version;
|
|
|
| gpu::IdentifyActiveGPU(&gpu_info);
|
| +
|
| gpu::CollectDriverInfoGL(&gpu_info);
|
|
|
| UpdateGpuInfo(gpu_info);
|
| @@ -523,6 +524,18 @@ void GpuDataManagerImplPrivate::Initialize() {
|
| TRACE_EVENT0("startup",
|
| "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
|
| gpu::CollectBasicGraphicsInfo(&gpu_info);
|
| +
|
| + if (command_line->HasSwitch(switches::kGpuTestingVendorId) &&
|
| + command_line->HasSwitch(switches::kGpuTestingDeviceId)) {
|
| + base::HexStringToUInt(
|
| + command_line->GetSwitchValueASCII(switches::kGpuTestingVendorId),
|
| + &gpu_info.gpu.vendor_id);
|
| + base::HexStringToUInt(
|
| + command_line->GetSwitchValueASCII(switches::kGpuTestingDeviceId),
|
| + &gpu_info.gpu.device_id);
|
| + gpu_info.gpu.active = true;
|
| + gpu_info.secondary_gpus.clear();
|
| + }
|
| }
|
| #if defined(ARCH_CPU_X86_FAMILY)
|
| if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id) {
|
| @@ -556,9 +569,17 @@ void GpuDataManagerImplPrivate::Initialize() {
|
| void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
|
| GetContentClient()->SetGpuInfo(gpu_info_);
|
|
|
| + const base::CommandLine* command_line =
|
| + base::CommandLine::ForCurrentProcess();
|
| +
|
| + std::string os_version;
|
| + if (command_line->HasSwitch(switches::kGpuTestingOsVersion))
|
| + os_version =
|
| + command_line->GetSwitchValueASCII(switches::kGpuTestingOsVersion);
|
| +
|
| if (gpu_blacklist_) {
|
| std::set<int> features = gpu_blacklist_->MakeDecision(
|
| - gpu::GpuControlList::kOsAny, std::string(), gpu_info_);
|
| + gpu::GpuControlList::kOsAny, os_version, gpu_info_);
|
| if (update_histograms_)
|
| UpdateStats(gpu_info_, gpu_blacklist_.get(), features);
|
|
|
| @@ -566,13 +587,11 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
|
| }
|
| if (gpu_driver_bug_list_) {
|
| gpu_driver_bugs_ = gpu_driver_bug_list_->MakeDecision(
|
| - gpu::GpuControlList::kOsAny, std::string(), gpu_info_);
|
| + gpu::GpuControlList::kOsAny, os_version, gpu_info_);
|
|
|
| std::set<std::string> disabled_ext_set;
|
|
|
| // Merge disabled extensions from the command line with gpu driver bug list.
|
| - const base::CommandLine* command_line =
|
| - base::CommandLine::ForCurrentProcess();
|
| if (command_line) {
|
| const std::vector<std::string>& disabled_command_line_exts =
|
| base::SplitString(
|
|
|