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

Unified Diff: content/browser/gpu/gpu_data_manager_impl.cc

Issue 2756793003: Move GPU blacklist and driver bug workaround list from json to data struct. (Closed)
Patch Set: pure rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_data_manager_impl_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0d5202676762de99ed03af43cad758a6407fc045..fb2fb3847e153ff44d616508516e7ac9948bb519 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -19,14 +19,55 @@ 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",
+ arraysize(kFeatureListForEntry0), // features size
+ 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_);
// Relax the cross-thread access restriction to non-thread-safe RefCount.
// See the comment in Initialize().
base::ScopedAllowCrossThreadRefCountAccess
allow_cross_thread_ref_count_access;
- private_->InitializeForTesting(gpu_blacklist_json, gpu_info);
+ private_->InitializeForTesting(gpu_blacklist_data, gpu_info);
}
bool GpuDataManagerImpl::IsFeatureBlacklisted(int feature) const {
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_data_manager_impl_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698