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

Unified Diff: gpu/config/gpu_control_list.cc

Issue 1117813002: Add GL strings to CastSysInfo interface and use to configure GPU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: gpu/config/gpu_control_list.cc
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc
index 3dd1d923ae9a0b53bc0bff2e27e61bc50a2aac09..b9bc8c122cbe05a8d3a18a5bdfc6aafab0e79462 100644
--- a/gpu/config/gpu_control_list.cc
+++ b/gpu/config/gpu_control_list.cc
@@ -458,6 +458,17 @@ GpuControlList::GpuControlListEntry::GetEntryFromValue(
dictionary_entry_count++;
}
+ std::string vendor_string;
+ if (value->GetString("vendor_string", &vendor_string)) {
+ entry->SetVendorString(vendor_string);
+ dictionary_entry_count++;
+ }
+ std::string device_string;
+ if (value->GetString("device_string", &device_string)) {
+ entry->SetDeviceString(device_string);
+ dictionary_entry_count++;
+ }
+
const base::ListValue* device_id_list;
if (value->GetList("device_id", &device_id_list)) {
for (size_t i = 0; i < device_id_list->GetSize(); ++i) {
@@ -808,6 +819,11 @@ bool GpuControlList::GpuControlListEntry::SetVendorId(
vendor_id_ != 0;
}
+void GpuControlList::GpuControlListEntry::SetVendorString(
+ const std::string& vendor_string) {
+ vendor_string_ = vendor_string;
+}
+
bool GpuControlList::GpuControlListEntry::AddDeviceId(
const std::string& device_id_string) {
uint32 device_id = 0;
@@ -818,6 +834,11 @@ bool GpuControlList::GpuControlListEntry::AddDeviceId(
return false;
}
+void GpuControlList::GpuControlListEntry::SetDeviceString(
+ const std::string& device_string) {
+ device_string_ = device_string;
+}
+
bool GpuControlList::GpuControlListEntry::SetMultiGpuStyle(
const std::string& multi_gpu_style_string) {
MultiGpuStyle style = StringToMultiGpuStyle(multi_gpu_style_string);
@@ -1182,6 +1203,10 @@ bool GpuControlList::GpuControlListEntry::Contains(
case kMultiGpuStyleNone:
break;
}
+ if (StringMismatch(gpu_info.gpu.vendor_string, vendor_string_))
+ return false;
+ if (StringMismatch(gpu_info.gpu.device_string, device_string_))
+ return false;
if (StringMismatch(gpu_info.driver_vendor, driver_vendor_info_))
return false;
if (driver_version_info_.get() != NULL && !gpu_info.driver_version.empty()) {
@@ -1517,4 +1542,3 @@ void GpuControlList::set_supports_feature_type_all(bool supported) {
}
} // namespace gpu
-

Powered by Google App Engine
This is Rietveld 408576698