Index: content/browser/gpu/gpu_data_manager_impl.cc |
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc |
index 0c74a29bdcf0d0025317a89c2863504a25a8c2e7..1d13110cdd654ac947c605bedcb351224b692631 100644 |
--- a/content/browser/gpu/gpu_data_manager_impl.cc |
+++ b/content/browser/gpu/gpu_data_manager_impl.cc |
@@ -19,10 +19,52 @@ GpuDataManagerImpl* GpuDataManagerImpl::GetInstance() { |
return base::Singleton<GpuDataManagerImpl>::get(); |
} |
+void GpuDataManagerImpl::BlacklistWebGLForTesting() { |
+ // Manually generate the following data instead of going through |
+ // gpu/config/process_json.py because this is just one simple instance. |
+ static const int kFeatureListForEntry0[1] = { |
+ gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL |
+ }; |
+ static const gpu::GpuControlList::Entry kEntry = { |
+ 1, // id |
+ "ExtensionWebstoreGetWebGLStatusTest.Blocked", |
+ 1, // features size |
Ken Russell (switch to Gerrit)
2017/03/31 02:37:06
Could consider revising this handwritten entry to
Zhenyao Mo
2017/03/31 19:14:13
Done.
|
+ kFeatureListForEntry0, // features |
+ 0, // DisabledExtensions size |
+ nullptr, // DisabledExtensions |
+ 0, // CrBugs size |
+ nullptr, // CrBugs |
+ { |
+ gpu::GpuControlList::kOsAny, // os_type |
+ {gpu::GpuControlList::kUnknown, |
+ gpu::GpuControlList::kVersionStyleNumerical, |
+ nullptr, nullptr}, // os_version |
+ 0x00, // vendor_id |
+ 0, // DeviceIDs size |
+ nullptr, // DeviceIDs |
+ gpu::GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category |
+ gpu::GpuControlList::kMultiGpuStyleNone, // multi_gpu_style |
+ nullptr, // driver info |
+ nullptr, // GL strings |
+ nullptr, // machine model info |
+ nullptr, // more conditions |
+ }, |
+ 0, // exceptions count |
+ nullptr, // exceptions |
+ }; |
+ static const gpu::GpuControlListData kData("1.0", 1, &kEntry); |
+ |
+ gpu::GPUInfo gpu_info; |
+ |
+ base::AutoLock auto_lock(lock_); |
+ private_->InitializeForTesting(kData, gpu_info); |
+} |
+ |
void GpuDataManagerImpl::InitializeForTesting( |
- const std::string& gpu_blacklist_json, const gpu::GPUInfo& gpu_info) { |
+ const gpu::GpuControlListData& gpu_blacklist_data, |
+ const gpu::GPUInfo& gpu_info) { |
base::AutoLock auto_lock(lock_); |
- private_->InitializeForTesting(gpu_blacklist_json, gpu_info); |
+ private_->InitializeForTesting(gpu_blacklist_data, gpu_info); |
} |
bool GpuDataManagerImpl::IsFeatureBlacklisted(int feature) const { |