| 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 : level_(kUninitialized), | 8 : progress_(kUninitialized), |
| 9 vendor_id_(0), | 9 vendor_id_(0), |
| 10 device_id_(0), | 10 device_id_(0), |
| 11 driver_vendor_(""), | 11 driver_vendor_(""), |
| 12 driver_version_(""), | 12 driver_version_(""), |
| 13 pixel_shader_version_(0), | 13 pixel_shader_version_(0), |
| 14 vertex_shader_version_(0), | 14 vertex_shader_version_(0), |
| 15 gl_version_(0), | 15 gl_version_(0), |
| 16 gl_version_string_(""), | 16 gl_version_string_(""), |
| 17 gl_vendor_(""), | 17 gl_vendor_(""), |
| 18 gl_renderer_(""), | 18 gl_renderer_(""), |
| 19 gl_extensions_(""), | 19 gl_extensions_(""), |
| 20 can_lose_context_(false) { | 20 can_lose_context_(false) { |
| 21 } | 21 } |
| 22 | 22 |
| 23 GPUInfo::Level GPUInfo::level() const { | 23 GPUInfo::Progress GPUInfo::progress() const { |
| 24 return level_; | 24 return progress_; |
| 25 } | 25 } |
| 26 | 26 |
| 27 base::TimeDelta GPUInfo::initialization_time() const { | 27 base::TimeDelta GPUInfo::initialization_time() const { |
| 28 return initialization_time_; | 28 return initialization_time_; |
| 29 } | 29 } |
| 30 | 30 |
| 31 uint32 GPUInfo::vendor_id() const { | 31 uint32 GPUInfo::vendor_id() const { |
| 32 return vendor_id_; | 32 return vendor_id_; |
| 33 } | 33 } |
| 34 | 34 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 | 70 |
| 71 std::string GPUInfo::gl_extensions() const { | 71 std::string GPUInfo::gl_extensions() const { |
| 72 return gl_extensions_; | 72 return gl_extensions_; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool GPUInfo::can_lose_context() const { | 75 bool GPUInfo::can_lose_context() const { |
| 76 return can_lose_context_; | 76 return can_lose_context_; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void GPUInfo::SetLevel(Level level) { | 79 void GPUInfo::SetProgress(Progress progress) { |
| 80 level_ = level; | 80 progress_ = progress; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void GPUInfo::SetInitializationTime( | 83 void GPUInfo::SetInitializationTime( |
| 84 const base::TimeDelta& initialization_time) { | 84 const base::TimeDelta& initialization_time) { |
| 85 initialization_time_ = initialization_time; | 85 initialization_time_ = initialization_time; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void GPUInfo::SetVideoCardInfo(uint32 vendor_id, uint32 device_id) { | 88 void GPUInfo::SetVideoCardInfo(uint32 vendor_id, uint32 device_id) { |
| 89 vendor_id_ = vendor_id; | 89 vendor_id_ = vendor_id; |
| 90 device_id_ = device_id; | 90 device_id_ = device_id; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 #if defined(OS_WIN) | 129 #if defined(OS_WIN) |
| 130 const DxDiagNode& GPUInfo::dx_diagnostics() const { | 130 const DxDiagNode& GPUInfo::dx_diagnostics() const { |
| 131 return dx_diagnostics_; | 131 return dx_diagnostics_; |
| 132 } | 132 } |
| 133 | 133 |
| 134 void GPUInfo::SetDxDiagnostics(const DxDiagNode& dx_diagnostics) { | 134 void GPUInfo::SetDxDiagnostics(const DxDiagNode& dx_diagnostics) { |
| 135 dx_diagnostics_ = dx_diagnostics; | 135 dx_diagnostics_ = dx_diagnostics; |
| 136 } | 136 } |
| 137 #endif | 137 #endif |
| OLD | NEW |