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

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

Issue 1142423005: [M44 Merge] Refine dual-GPU detection on Mac OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2403
Patch Set: Created 5 years, 7 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 | « no previous file | ui/gl/gpu_switching_manager.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_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 d0a407bd5073238344b547341e82ce511f59536e..201e45765862165daba3dd3d8118730c5b486977 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1032,8 +1032,14 @@ void GpuDataManagerImplPrivate::UpdatePreliminaryBlacklistedFeatures() {
void GpuDataManagerImplPrivate::UpdateGpuSwitchingManager(
const gpu::GPUInfo& gpu_info) {
- ui::GpuSwitchingManager::GetInstance()->SetGpuCount(
- gpu_info.secondary_gpus.size() + 1);
+ // The vendor IDs might be 0 on non-PCI devices (like Android), but
+ // the length of the vector is all we care about in most cases.
+ std::vector<uint32> vendor_ids;
+ vendor_ids.push_back(gpu_info.gpu.vendor_id);
+ for (const auto& device : gpu_info.secondary_gpus) {
+ vendor_ids.push_back(device.vendor_id);
+ }
+ ui::GpuSwitchingManager::GetInstance()->SetGpuVendorIds(vendor_ids);
if (ui::GpuSwitchingManager::GetInstance()->SupportsDualGpus()) {
if (gpu_driver_bugs_.count(gpu::FORCE_DISCRETE_GPU) == 1)
« no previous file with comments | « no previous file | ui/gl/gpu_switching_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698