summaryrefslogtreecommitdiffstats
path: root/chrome/common/gpu_info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/gpu_info.cc')
-rw-r--r--chrome/common/gpu_info.cc83
1 files changed, 67 insertions, 16 deletions
diff --git a/chrome/common/gpu_info.cc b/chrome/common/gpu_info.cc
index 744fdfc..ff9caae 100644
--- a/chrome/common/gpu_info.cc
+++ b/chrome/common/gpu_info.cc
@@ -1,22 +1,29 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
#include "chrome/common/gpu_info.h"
GPUInfo::GPUInfo()
- : progress_(kUninitialized),
+ : level_(kUninitialized),
vendor_id_(0),
device_id_(0),
- driver_version_(L""),
+ driver_vendor_(""),
+ driver_version_(""),
pixel_shader_version_(0),
vertex_shader_version_(0),
gl_version_(0),
+ gl_version_string_(""),
+ gl_vendor_(""),
+ gl_renderer_(""),
+ gl_extensions_(""),
can_lose_context_(false) {
}
-GPUInfo::Progress GPUInfo::progress() const {
- return progress_;
+GPUInfo::~GPUInfo() {}
+
+GPUInfo::Level GPUInfo::level() const {
+ return level_;
}
base::TimeDelta GPUInfo::initialization_time() const {
@@ -31,7 +38,11 @@ uint32 GPUInfo::device_id() const {
return device_id_;
}
-std::wstring GPUInfo::driver_version() const {
+std::string GPUInfo::driver_vendor() const {
+ return driver_vendor_;
+}
+
+std::string GPUInfo::driver_version() const {
return driver_version_;
}
@@ -47,34 +58,74 @@ uint32 GPUInfo::gl_version() const {
return gl_version_;
}
+std::string GPUInfo::gl_version_string() const {
+ return gl_version_string_;
+}
+
+std::string GPUInfo::gl_vendor() const {
+ return gl_vendor_;
+}
+
+std::string GPUInfo::gl_renderer() const {
+ return gl_renderer_;
+}
+
+std::string GPUInfo::gl_extensions() const {
+ return gl_extensions_;
+}
bool GPUInfo::can_lose_context() const {
return can_lose_context_;
}
+void GPUInfo::SetLevel(Level level) {
+ level_ = level;
+}
+
void GPUInfo::SetInitializationTime(
const base::TimeDelta& initialization_time) {
initialization_time_ = initialization_time;
}
-
-void GPUInfo::SetGraphicsInfo(uint32 vendor_id, uint32 device_id,
- const std::wstring& driver_version,
- uint32 pixel_shader_version,
- uint32 vertex_shader_version,
- uint32 gl_version,
- bool can_lose_context) {
+void GPUInfo::SetVideoCardInfo(uint32 vendor_id, uint32 device_id) {
vendor_id_ = vendor_id;
device_id_ = device_id;
+}
+
+void GPUInfo::SetDriverInfo(const std::string& driver_vendor,
+ const std::string& driver_version) {
+ driver_vendor_ = driver_vendor;
driver_version_ = driver_version;
+}
+
+void GPUInfo::SetShaderVersion(uint32 pixel_shader_version,
+ uint32 vertex_shader_version) {
pixel_shader_version_ = pixel_shader_version;
vertex_shader_version_ = vertex_shader_version;
+}
+
+void GPUInfo::SetGLVersion(uint32 gl_version) {
gl_version_ = gl_version;
- can_lose_context_ = can_lose_context;
}
-void GPUInfo::SetProgress(Progress progress) {
- progress_ = progress;
+void GPUInfo::SetGLVersionString(const std::string& gl_version_string) {
+ gl_version_string_ = gl_version_string;
+}
+
+void GPUInfo::SetGLVendor(const std::string& gl_vendor) {
+ gl_vendor_ = gl_vendor;
+}
+
+void GPUInfo::SetGLRenderer(const std::string& gl_renderer) {
+ gl_renderer_ = gl_renderer;
+}
+
+void GPUInfo::SetGLExtensions(const std::string& gl_extensions) {
+ gl_extensions_ = gl_extensions;
+}
+
+void GPUInfo::SetCanLoseContext(bool can_lose_context) {
+ can_lose_context_ = can_lose_context;
}
#if defined(OS_WIN)