summaryrefslogtreecommitdiffstats
path: root/chrome/common/gpu_info.h
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
committerIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
commit3345a6884c488ff3a535c2c9acdd33d74b37e311 (patch)
tree7784b988ef1698cb6967ea1bdf07616237716c6c /chrome/common/gpu_info.h
parentefc8475837ec58186051f23bb03542620424f6ce (diff)
downloadexternal_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.zip
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.gz
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.bz2
Merge Chromium at 7.0.540.0 : Initial merge by git
Not including third_party/icu as it contains huge data files that break Gerrit, and aren't actually used. Change-Id: I428a386e70f3b58cacd28677b8cfda282e891e15
Diffstat (limited to 'chrome/common/gpu_info.h')
-rw-r--r--chrome/common/gpu_info.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/common/gpu_info.h b/chrome/common/gpu_info.h
index 65b5075..2f8f9da 100644
--- a/chrome/common/gpu_info.h
+++ b/chrome/common/gpu_info.h
@@ -4,6 +4,7 @@
#ifndef CHROME_COMMON_GPU_INFO_H__
#define CHROME_COMMON_GPU_INFO_H__
+#pragma once
// Provides access to the GPU information for the system
// on which chrome is currently running.
@@ -17,6 +18,9 @@ class GPUInfo {
GPUInfo();
~GPUInfo() {}
+ // Returns whether this GPUInfo has been initialized with information
+ bool initialized() const;
+
// Return the DWORD (uint32) representing the graphics card vendor id.
uint32 vendor_id() const;
@@ -38,17 +42,33 @@ class GPUInfo {
// should be okay.
uint32 vertex_shader_version() const;
+ // Return the version of OpenGL we are using.
+ // Major version in the high word, minor in the low word, eg version 2.5
+ // would be 0x00020005.
+ // Returns 0 if we're not using OpenGL, say because we're going through
+ // D3D instead.
+ uint32 gl_version() const;
+
+ // Return the device semantics, i.e. whether the Vista and Windows 7 specific
+ // semantics are available.
+ bool can_lose_context() 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);
+ uint32 vertex_shader_version,
+ uint32 gl_version,
+ bool can_lose_context);
private:
+ bool initialized_;
uint32 vendor_id_;
uint32 device_id_;
std::wstring driver_version_;
uint32 pixel_shader_version_;
uint32 vertex_shader_version_;
+ uint32 gl_version_;
+ bool can_lose_context_;
};
#endif // CHROME_COMMON_GPU_INFO_H__