| 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 : initialized_(false), vendor_id_(0), device_id_(0), driver_version_(L""), | 8 : progress_(kUninitialized), |
| 9 vendor_id_(0), |
| 10 device_id_(0), |
| 11 driver_version_(L""), |
| 9 pixel_shader_version_(0), | 12 pixel_shader_version_(0), |
| 10 vertex_shader_version_(0), | 13 vertex_shader_version_(0), |
| 11 gl_version_(0), | 14 gl_version_(0), |
| 12 can_lose_context_(false) { | 15 can_lose_context_(false) { |
| 13 } | 16 } |
| 14 | 17 |
| 15 bool GPUInfo::initialized() const { | 18 GPUInfo::Progress GPUInfo::progress() const { |
| 16 return initialized_; | 19 return progress_; |
| 17 } | 20 } |
| 18 | 21 |
| 19 base::TimeDelta GPUInfo::initialization_time() const { | 22 base::TimeDelta GPUInfo::initialization_time() const { |
| 20 return initialization_time_; | 23 return initialization_time_; |
| 21 } | 24 } |
| 22 | 25 |
| 23 uint32 GPUInfo::vendor_id() const { | 26 uint32 GPUInfo::vendor_id() const { |
| 24 return vendor_id_; | 27 return vendor_id_; |
| 25 } | 28 } |
| 26 | 29 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 uint32 vertex_shader_version, | 64 uint32 vertex_shader_version, |
| 62 uint32 gl_version, | 65 uint32 gl_version, |
| 63 bool can_lose_context) { | 66 bool can_lose_context) { |
| 64 vendor_id_ = vendor_id; | 67 vendor_id_ = vendor_id; |
| 65 device_id_ = device_id; | 68 device_id_ = device_id; |
| 66 driver_version_ = driver_version; | 69 driver_version_ = driver_version; |
| 67 pixel_shader_version_ = pixel_shader_version; | 70 pixel_shader_version_ = pixel_shader_version; |
| 68 vertex_shader_version_ = vertex_shader_version; | 71 vertex_shader_version_ = vertex_shader_version; |
| 69 gl_version_ = gl_version; | 72 gl_version_ = gl_version; |
| 70 can_lose_context_ = can_lose_context; | 73 can_lose_context_ = can_lose_context; |
| 71 initialized_ = true; | 74 } |
| 75 |
| 76 void GPUInfo::SetProgress(Progress progress) { |
| 77 progress_ = progress; |
| 72 } | 78 } |
| 73 | 79 |
| 74 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
| 75 const DxDiagNode& GPUInfo::dx_diagnostics() const { | 81 const DxDiagNode& GPUInfo::dx_diagnostics() const { |
| 76 return dx_diagnostics_; | 82 return dx_diagnostics_; |
| 77 } | 83 } |
| 78 | 84 |
| 79 void GPUInfo::SetDxDiagnostics(const DxDiagNode& dx_diagnostics) { | 85 void GPUInfo::SetDxDiagnostics(const DxDiagNode& dx_diagnostics) { |
| 80 dx_diagnostics_ = dx_diagnostics; | 86 dx_diagnostics_ = dx_diagnostics; |
| 81 } | 87 } |
| 82 #endif | 88 #endif |
| OLD | NEW |