diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 17:25:18 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 17:25:18 +0000 |
commit | 3161a3d39abf9124d390636c1eb42192309bf1d0 (patch) | |
tree | 4b7042588f3d289ef4da026b34883720f621543c /chrome/gpu | |
parent | 3bf9dc8661c93154d61b9f8905d6df53e5c48768 (diff) | |
download | chromium_src-3161a3d39abf9124d390636c1eb42192309bf1d0.zip chromium_src-3161a3d39abf9124d390636c1eb42192309bf1d0.tar.gz chromium_src-3161a3d39abf9124d390636c1eb42192309bf1d0.tar.bz2 |
Inlining accessors and mutators of gpu_info so that there won't be duplicate across platform implementations.
BUG=38736
TEST=gpu unittests
Review URL: http://codereview.chromium.org/2830025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_info.cc | 36 | ||||
-rw-r--r-- | chrome/gpu/gpu_info_win.cc | 31 |
2 files changed, 36 insertions, 31 deletions
diff --git a/chrome/gpu/gpu_info.cc b/chrome/gpu/gpu_info.cc new file mode 100644 index 0000000..36ff12a --- /dev/null +++ b/chrome/gpu/gpu_info.cc @@ -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. + +#include "chrome/gpu/gpu_info.h" + +uint32 GPUInfo::vendor_id() const { + return vendor_id_; +} + +uint32 GPUInfo::device_id() const { + return device_id_; +} + +std::wstring GPUInfo::driver_version() const { + return driver_version_; +} + +uint32 GPUInfo::pixel_shader_version() const { + return pixel_shader_version_; +} + +uint32 GPUInfo::vertex_shader_version() const { + return vertex_shader_version_; +} + +void GPUInfo::SetGraphicsInfo(uint32 vendor_id, uint32 device_id, + const std::wstring& driver_version, + uint32 pixel_shader_version, + uint32 vertex_shader_version) { + vendor_id_ = vendor_id; + device_id_ = device_id; + driver_version_ = driver_version; + pixel_shader_version_ = pixel_shader_version; + vertex_shader_version_ = vertex_shader_version; +} diff --git a/chrome/gpu/gpu_info_win.cc b/chrome/gpu/gpu_info_win.cc index f2a9dec..529b1ab 100644 --- a/chrome/gpu/gpu_info_win.cc +++ b/chrome/gpu/gpu_info_win.cc @@ -11,37 +11,6 @@ #include "base/scoped_native_library.h" #include "base/string_util.h" -uint32 GPUInfo::vendor_id() const { - return vendor_id_; -} - -uint32 GPUInfo::device_id() const { - return device_id_; -} - -std::wstring GPUInfo::driver_version() const { - return driver_version_; -} - -uint32 GPUInfo::pixel_shader_version() const { - return pixel_shader_version_; -} - -uint32 GPUInfo::vertex_shader_version() const { - return vertex_shader_version_; -} - -void GPUInfo::SetGraphicsInfo(uint32 vendor_id, uint32 device_id, - const std::wstring& driver_version, - uint32 pixel_shader_version, - uint32 vertex_shader_version) { - vendor_id_ = vendor_id; - device_id_ = device_id; - driver_version_ = driver_version; - pixel_shader_version_ = pixel_shader_version; - vertex_shader_version_ = vertex_shader_version; -} - bool GPUInfo::CollectGraphicsInfo() { FilePath d3d_path(base::GetNativeLibraryName(L"d3d9")); base::ScopedNativeLibrary d3dlib(d3d_path); |