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:39:14 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-07 00:39:14 +0000
commit3c3e9cbd14db0b8cfb0c26d3ecf82fbd99e636d0 (patch)
tree7065896c271545b4fefbd2020226a069a4b89d9b /content/gpu
parent9a811701c538c6439d9a800fae303d46300f7db5 (diff)
downloadchromium_src-3c3e9cbd14db0b8cfb0c26d3ecf82fbd99e636d0.zip
chromium_src-3c3e9cbd14db0b8cfb0c26d3ecf82fbd99e636d0.tar.gz
chromium_src-3c3e9cbd14db0b8cfb0c26d3ecf82fbd99e636d0.tar.bz2
Merge 120651 - 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 TBR=jbauman@chromium.org Review URL: https://chromiumcodereview.appspot.com/9351002 git-svn-id: svn://svn.chromium.org/chrome/branches/1025/src@120657 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);