diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 16:10:43 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 16:10:43 +0000 |
commit | 1bf14bcd62453cb53e21097a61fcefb0c5cc213b (patch) | |
tree | 31b6391aeec0832a7efe4f9b7bd22f4eca1ca127 /chrome/common/gpu_info.h | |
parent | 2233a372c11e86d3268a3bbcdd8f7f1d305243eb (diff) | |
download | chromium_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/common/gpu_info.h')
-rw-r--r-- | chrome/common/gpu_info.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/chrome/common/gpu_info.h b/chrome/common/gpu_info.h new file mode 100644 index 0000000..acbc18c --- /dev/null +++ b/chrome/common/gpu_info.h @@ -0,0 +1,54 @@ +// 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_COMMON_GPU_INFO_H__ +#define CHROME_COMMON_GPU_INFO_H__ + +// Provides access to the GPU information for the system +// on which chrome is currently running. + +#include <string> + +#include "base/basictypes.h" + +class GPUInfo { + public: + GPUInfo() {} + ~GPUInfo() {} + + // Return the DWORD (uint32) representing the graphics card vendor id. + uint32 vendor_id() const; + + // Return the DWORD (uint32) representing the graphics card device id. + // Device ids are unique to vendor, not to one another. + uint32 device_id() const; + + // Return the version of the graphics driver currently installed. + // This will typically be something + std::wstring driver_version() const; + + // Return the version of the pixel/fragment shader used by the gpu. + // This will typically be a number less than 10 so storing as a float + // should be okay. + uint32 pixel_shader_version() const; + + // Return the version of the vertex shader used by the gpu. + // This will typically be a number less than 10 so storing as a float + // should be okay. + uint32 vertex_shader_version() const; + + // Populate variables with passed in values + void SetGraphicsInfo(uint32 vendor_id, uint32 device_id, + const std::wstring& driver_version, + uint32 pixel_shader_version, + uint32 vertex_shader_version); + private: + uint32 vendor_id_; + uint32 device_id_; + std::wstring driver_version_; + uint32 pixel_shader_version_; + uint32 vertex_shader_version_; +}; + +#endif // CHROME_COMMON_GPU_INFO_H__ |