summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 17:59:42 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 17:59:42 +0000
commita61508e5901304418d0c861a79b788c6fd74a997 (patch)
treec1f48290c209f8ac3726b3e734cb8b9404816ab3 /content
parenta37d7ec1af822aa3524308c58c5160e3bf117965 (diff)
downloadchromium_src-a61508e5901304418d0c861a79b788c6fd74a997.zip
chromium_src-a61508e5901304418d0c861a79b788c6fd74a997.tar.gz
chromium_src-a61508e5901304418d0c861a79b788c6fd74a997.tar.bz2
Make GPUInfo a struct, which it should be according to the C++ guidelines. This makes it easy to write automated serilization code for it.
Review URL: http://codereview.chromium.org/6621057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/gpu_blacklist.cc15
-rw-r--r--content/browser/gpu_blacklist.h2
-rw-r--r--content/browser/gpu_blacklist_unittest.cc12
-rw-r--r--content/browser/gpu_process_host.cc1
-rw-r--r--content/browser/renderer_host/gpu_message_filter.h4
5 files changed, 16 insertions, 18 deletions
diff --git a/content/browser/gpu_blacklist.cc b/content/browser/gpu_blacklist.cc
index 6e61400..ce54c28 100644
--- a/content/browser/gpu_blacklist.cc
+++ b/content/browser/gpu_blacklist.cc
@@ -500,12 +500,12 @@ bool GpuBlacklist::GpuBlacklistEntry::Contains(
DCHECK(os_type != kOsAny);
if (os_info_.get() != NULL && !os_info_->Contains(os_type, os_version))
return false;
- if (vendor_id_ != 0 && vendor_id_ != gpu_info.vendor_id())
+ if (vendor_id_ != 0 && vendor_id_ != gpu_info.vendor_id)
return false;
if (device_id_list_.size() > 0) {
bool found = false;
for (size_t i = 0; i < device_id_list_.size(); ++i) {
- if (device_id_list_[i] == gpu_info.device_id()) {
+ if (device_id_list_[i] == gpu_info.device_id) {
found = true;
break;
}
@@ -514,24 +514,23 @@ bool GpuBlacklist::GpuBlacklistEntry::Contains(
return false;
}
if (driver_vendor_info_.get() != NULL &&
- !driver_vendor_info_->Contains(gpu_info.driver_vendor()))
+ !driver_vendor_info_->Contains(gpu_info.driver_vendor))
return false;
if (driver_version_info_.get() != NULL) {
scoped_ptr<Version> driver_version(
- Version::GetVersionFromString(gpu_info.driver_version()));
+ Version::GetVersionFromString(gpu_info.driver_version));
if (driver_version.get() == NULL ||
!driver_version_info_->Contains(*driver_version))
return false;
}
if (driver_date_info_.get() != NULL) {
- scoped_ptr<Version> driver_date(GetDateFromString(
- gpu_info.driver_date()));
+ scoped_ptr<Version> driver_date(GetDateFromString(gpu_info.driver_date));
if (driver_date.get() == NULL ||
!driver_date_info_->Contains(*driver_date))
return false;
}
if (gl_renderer_info_.get() != NULL &&
- !gl_renderer_info_->Contains(gpu_info.gl_renderer()))
+ !gl_renderer_info_->Contains(gpu_info.gl_renderer))
return false;
for (size_t i = 0; i < exceptions_.size(); ++i) {
if (exceptions_[i]->Contains(os_type, os_version, gpu_info))
@@ -634,7 +633,7 @@ GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags(
active_entries_.clear();
GpuFeatureFlags flags;
// No need to go through blacklist entries if GPUInfo isn't available.
- if (gpu_info.level() == GPUInfo::kUninitialized)
+ if (gpu_info.level == GPUInfo::kUninitialized)
return flags;
if (os == kOsAny)
diff --git a/content/browser/gpu_blacklist.h b/content/browser/gpu_blacklist.h
index ecde21e..2b810b7 100644
--- a/content/browser/gpu_blacklist.h
+++ b/content/browser/gpu_blacklist.h
@@ -15,8 +15,8 @@
#include "chrome/common/gpu_feature_flags.h"
class DictionaryValue;
-class GPUInfo;
class Version;
+struct GPUInfo;
class GpuBlacklist {
public:
diff --git a/content/browser/gpu_blacklist_unittest.cc b/content/browser/gpu_blacklist_unittest.cc
index a568256..6008b62 100644
--- a/content/browser/gpu_blacklist_unittest.cc
+++ b/content/browser/gpu_blacklist_unittest.cc
@@ -26,12 +26,12 @@ class GpuBlacklistTest : public testing::Test {
protected:
void SetUp() {
- gpu_info_.SetVideoCardInfo(0x10de, // Vendor ID
- 0x0640); // Device ID
- gpu_info_.SetDriverInfo("NVIDIA", // Driver vendor
- "1.6.18", // Driver Version
- "7-14-2009"); // Driver date
- gpu_info_.SetLevel(GPUInfo::kComplete);
+ gpu_info_.vendor_id = 0x10de;
+ gpu_info_.device_id = 0x0640;
+ gpu_info_.driver_vendor = "NVIDIA";
+ gpu_info_.driver_version = "1.6.18";
+ gpu_info_.driver_date = "7-14-2009";
+ gpu_info_.level = GPUInfo::kComplete;
}
void TearDown() {
diff --git a/content/browser/gpu_process_host.cc b/content/browser/gpu_process_host.cc
index 61936f6..e89a46e 100644
--- a/content/browser/gpu_process_host.cc
+++ b/content/browser/gpu_process_host.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/gpu_feature_flags.h"
-#include "chrome/common/gpu_info.h"
#include "chrome/common/gpu_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/gpu/gpu_thread.h"
diff --git a/content/browser/renderer_host/gpu_message_filter.h b/content/browser/renderer_host/gpu_message_filter.h
index 625afc6..7c0f398 100644
--- a/content/browser/renderer_host/gpu_message_filter.h
+++ b/content/browser/renderer_host/gpu_message_filter.h
@@ -8,10 +8,10 @@
#include "content/browser/browser_message_filter.h"
-struct GPUCreateCommandBufferConfig;
-class GPUInfo;
class GpuProcessHost;
class GpuProcessHostUIShim;
+struct GPUCreateCommandBufferConfig;
+struct GPUInfo;
namespace IPC {
struct ChannelHandle;