summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authorshawnsingh@google.com <shawnsingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-12 19:55:33 +0000
committershawnsingh@google.com <shawnsingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-12 19:55:33 +0000
commit6cbf3b96ca8ad1f68f6531b14739dddf2caada0f (patch)
tree7d5b055e5e978c75bafe870f768e1972870c7648 /content/gpu
parente0d420d62f2a9e199b60aaaee8510309f8ceb653 (diff)
downloadchromium_src-6cbf3b96ca8ad1f68f6531b14739dddf2caada0f.zip
chromium_src-6cbf3b96ca8ad1f68f6531b14739dddf2caada0f.tar.gz
chromium_src-6cbf3b96ca8ad1f68f6531b14739dddf2caada0f.tar.bz2
Revert 172627
> Cache GL strings from GPU process and use them at next browser startup. > > So we can make complete GPU blacklist decisions at browser startup time. > > BUG=164728 > TEST= > Review URL: https://codereview.chromium.org/11446080 TBR=zmo@chromium.org Review URL: https://codereview.chromium.org/11549022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_info_collector.h2
-rw-r--r--content/gpu/gpu_info_collector_linux.cc31
2 files changed, 31 insertions, 2 deletions
diff --git a/content/gpu/gpu_info_collector.h b/content/gpu/gpu_info_collector.h
index 9adfa21..6a5fa43 100644
--- a/content/gpu/gpu_info_collector.h
+++ b/content/gpu/gpu_info_collector.h
@@ -53,7 +53,7 @@ bool CollectGLVersionInfo(content::GPUInfo* gpu_info);
bool CollectVideoCardInfo(content::GPUInfo* gpu_info);
// Each platform stores the driver version on the GL_VERSION string differently
-CONTENT_EXPORT bool CollectDriverInfoGL(content::GPUInfo* gpu_info);
+bool CollectDriverInfoGL(content::GPUInfo* gpu_info);
// Advanced Micro Devices has interesting configurations on laptops were
// there are two videocards that can alternatively a given process output.
diff --git a/content/gpu/gpu_info_collector_linux.cc b/content/gpu/gpu_info_collector_linux.cc
index 96a776d..d849cab 100644
--- a/content/gpu/gpu_info_collector_linux.cc
+++ b/content/gpu/gpu_info_collector_linux.cc
@@ -132,6 +132,36 @@ bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) {
bool rt = CollectVideoCardInfo(gpu_info);
+ std::string driver_version;
+ switch (gpu_info->gpu.vendor_id) {
+ case kVendorIDAMD:
+ driver_version = CollectDriverVersionATI();
+ if (!driver_version.empty()) {
+ gpu_info->driver_vendor = "ATI / AMD";
+ gpu_info->driver_version = driver_version;
+ }
+ break;
+ case kVendorIDNVidia:
+ driver_version = CollectDriverVersionNVidia();
+ if (!driver_version.empty()) {
+ gpu_info->driver_vendor = "NVIDIA";
+ gpu_info->driver_version = driver_version;
+ }
+ break;
+ case kVendorIDIntel:
+ // In dual-GPU cases, sometimes PCI scan only gives us the
+ // integrated GPU (i.e., the Intel one).
+ driver_version = CollectDriverVersionNVidia();
+ if (!driver_version.empty()) {
+ gpu_info->driver_vendor = "NVIDIA";
+ gpu_info->driver_version = driver_version;
+ // Machines with more than two GPUs are not handled.
+ if (gpu_info->secondary_gpus.size() <= 1)
+ gpu_info->optimus = true;
+ }
+ break;
+ }
+
return rt;
}
@@ -223,7 +253,6 @@ bool CollectVideoCardInfo(content::GPUInfo* gpu_info) {
}
(libpci_loader.pci_cleanup)(access);
-
return (primary_gpu_identified);
}