| OLD | NEW |
| 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/gpu_info.h" | 5 #include "chrome/common/gpu_info.h" |
| 6 | 6 |
| 7 GPUInfo::GPUInfo() | 7 GPUInfo::GPUInfo() |
| 8 : vendor_id_(0), device_id_(0), driver_version_(L""), | 8 : vendor_id_(0), device_id_(0), driver_version_(L""), |
| 9 pixel_shader_version_(0), vertex_shader_version_(0) { | 9 pixel_shader_version_(0), vertex_shader_version_(0), |
| 10 gl_version_(0) { |
| 10 } | 11 } |
| 11 | 12 |
| 12 uint32 GPUInfo::vendor_id() const { | 13 uint32 GPUInfo::vendor_id() const { |
| 13 return vendor_id_; | 14 return vendor_id_; |
| 14 } | 15 } |
| 15 | 16 |
| 16 uint32 GPUInfo::device_id() const { | 17 uint32 GPUInfo::device_id() const { |
| 17 return device_id_; | 18 return device_id_; |
| 18 } | 19 } |
| 19 | 20 |
| 20 std::wstring GPUInfo::driver_version() const { | 21 std::wstring GPUInfo::driver_version() const { |
| 21 return driver_version_; | 22 return driver_version_; |
| 22 } | 23 } |
| 23 | 24 |
| 24 uint32 GPUInfo::pixel_shader_version() const { | 25 uint32 GPUInfo::pixel_shader_version() const { |
| 25 return pixel_shader_version_; | 26 return pixel_shader_version_; |
| 26 } | 27 } |
| 27 | 28 |
| 28 uint32 GPUInfo::vertex_shader_version() const { | 29 uint32 GPUInfo::vertex_shader_version() const { |
| 29 return vertex_shader_version_; | 30 return vertex_shader_version_; |
| 30 } | 31 } |
| 31 | 32 |
| 33 uint32 GPUInfo::gl_version() const { |
| 34 return gl_version_; |
| 35 } |
| 36 |
| 37 |
| 32 void GPUInfo::SetGraphicsInfo(uint32 vendor_id, uint32 device_id, | 38 void GPUInfo::SetGraphicsInfo(uint32 vendor_id, uint32 device_id, |
| 33 const std::wstring& driver_version, | 39 const std::wstring& driver_version, |
| 34 uint32 pixel_shader_version, | 40 uint32 pixel_shader_version, |
| 35 uint32 vertex_shader_version) { | 41 uint32 vertex_shader_version, |
| 42 uint32 gl_version) { |
| 36 vendor_id_ = vendor_id; | 43 vendor_id_ = vendor_id; |
| 37 device_id_ = device_id; | 44 device_id_ = device_id; |
| 38 driver_version_ = driver_version; | 45 driver_version_ = driver_version; |
| 39 pixel_shader_version_ = pixel_shader_version; | 46 pixel_shader_version_ = pixel_shader_version; |
| 40 vertex_shader_version_ = vertex_shader_version; | 47 vertex_shader_version_ = vertex_shader_version; |
| 48 gl_version_ = gl_version; |
| 41 } | 49 } |
| OLD | NEW |