summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-07 00:29:45 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-07 00:29:45 +0000
commit84ad3a7929a3c515dcf788de8633c2d7e46cc8a1 (patch)
tree3a7e3f9d0af25c1cd6eb6a132e17a01730685698 /content/gpu
parentb0009b8525ba9afc3042f04c7695c3e41dcbc654 (diff)
downloadchromium_src-84ad3a7929a3c515dcf788de8633c2d7e46cc8a1.zip
chromium_src-84ad3a7929a3c515dcf788de8633c2d7e46cc8a1.tar.gz
chromium_src-84ad3a7929a3c515dcf788de8633c2d7e46cc8a1.tar.bz2
Reduce GPU sandbox level on NVIDIA optimus computers.
We've noticed a higher crash rate on computers that are using NVIDIA optimus since the most restrictive GPU process sandboxing was added, so add code to detect them and reduce the sandboxing back to M17 levels. BUG=110552 TEST= Review URL: https://chromiumcodereview.appspot.com/9334009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_info_collector_win.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/gpu/gpu_info_collector_win.cc b/content/gpu/gpu_info_collector_win.cc
index aa902c5..1736f43 100644
--- a/content/gpu/gpu_info_collector_win.cc
+++ b/content/gpu/gpu_info_collector_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -154,6 +154,10 @@ bool CollectGraphicsInfoD3D(IDirect3D9* d3d, content::GPUInfo* gpu_info) {
bool CollectVideoCardInfo(content::GPUInfo* gpu_info) {
DCHECK(gpu_info);
+ // nvd3d9wrap.dll is loaded into all processes when Optimus is enabled.
+ HMODULE nvd3d9wrap = GetModuleHandleW(L"nvd3d9wrap.dll");
+ gpu_info->optimus = nvd3d9wrap != NULL;
+
// Taken from http://developer.nvidia.com/object/device_ids.html
DISPLAY_DEVICE dd;
dd.cb = sizeof(DISPLAY_DEVICE);