summaryrefslogtreecommitdiffstats
path: root/chrome/gpu/gpu_info_collector.h
diff options
context:
space:
mode:
authorrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 16:10:43 +0000
committerrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 16:10:43 +0000
commit1bf14bcd62453cb53e21097a61fcefb0c5cc213b (patch)
tree31b6391aeec0832a7efe4f9b7bd22f4eca1ca127 /chrome/gpu/gpu_info_collector.h
parent2233a372c11e86d3268a3bbcdd8f7f1d305243eb (diff)
downloadchromium_src-1bf14bcd62453cb53e21097a61fcefb0c5cc213b.zip
chromium_src-1bf14bcd62453cb53e21097a61fcefb0c5cc213b.tar.gz
chromium_src-1bf14bcd62453cb53e21097a61fcefb0c5cc213b.tar.bz2
Moving gpu_info to common so that it can be used by param traits. Pulling the collection out into a separate class.
BUG=38736 TEST=existing unittests Review URL: http://codereview.chromium.org/2914001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu/gpu_info_collector.h')
-rw-r--r--chrome/gpu/gpu_info_collector.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_info_collector.h b/chrome/gpu/gpu_info_collector.h
new file mode 100644
index 0000000..8be89bd
--- /dev/null
+++ b/chrome/gpu/gpu_info_collector.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2006-2010 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.
+
+#ifndef CHROME_GPU_GPU_INFO_COLLECTOR_H__
+#define CHROME_GPU_GPU_INFO_COLLECTOR_H__
+
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "chrome/common/gpu_info.h"
+
+struct IDirect3D9;
+
+namespace gpu_info_collector {
+
+// Populate variables with necessary graphics card information.
+// Returns true on success.
+bool CollectGraphicsInfo(GPUInfo& gpu_info);
+
+#if defined(OS_WIN)
+// Windows provides two ways of doing graphics so we need two ways of
+// collecting info based on what's on a user's machine.
+// The selection between the two methods is done in the cc file.
+
+// A D3D argument is passed in for testing purposes
+bool CollectGraphicsInfoD3D(IDirect3D9* d3d, GPUInfo& gpu_info);
+
+// The GL version of collecting information
+bool CollectGraphicsInfoGL(GPUInfo& gpu_info);
+#endif
+
+} // namespace gpu_info_collector
+
+#endif // CHROME_GPU_GPU_INFO_COLLECTOR_H__