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 : progress_(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_(""), | |
20 can_lose_context_(false) { | 19 can_lose_context_(false) { |
21 } | 20 } |
22 | 21 |
23 GPUInfo::Progress GPUInfo::progress() const { | 22 GPUInfo::Progress GPUInfo::progress() const { |
24 return progress_; | 23 return progress_; |
25 } | 24 } |
26 | 25 |
27 base::TimeDelta GPUInfo::initialization_time() const { | 26 base::TimeDelta GPUInfo::initialization_time() const { |
28 return initialization_time_; | 27 return initialization_time_; |
29 } | 28 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 60 } |
62 | 61 |
63 std::string GPUInfo::gl_vendor() const { | 62 std::string GPUInfo::gl_vendor() const { |
64 return gl_vendor_; | 63 return gl_vendor_; |
65 } | 64 } |
66 | 65 |
67 std::string GPUInfo::gl_renderer() const { | 66 std::string GPUInfo::gl_renderer() const { |
68 return gl_renderer_; | 67 return gl_renderer_; |
69 } | 68 } |
70 | 69 |
71 std::string GPUInfo::gl_extensions() const { | |
72 return gl_extensions_; | |
73 } | |
74 | |
75 bool GPUInfo::can_lose_context() const { | 70 bool GPUInfo::can_lose_context() const { |
76 return can_lose_context_; | 71 return can_lose_context_; |
77 } | 72 } |
78 | 73 |
79 void GPUInfo::SetProgress(Progress progress) { | 74 void GPUInfo::SetProgress(Progress progress) { |
80 progress_ = progress; | 75 progress_ = progress; |
81 } | 76 } |
82 | 77 |
83 void GPUInfo::SetInitializationTime( | 78 void GPUInfo::SetInitializationTime( |
84 const base::TimeDelta& initialization_time) { | 79 const base::TimeDelta& initialization_time) { |
(...skipping 26 matching lines...) Expand all Loading... |
111 } | 106 } |
112 | 107 |
113 void GPUInfo::SetGLVendor(const std::string& gl_vendor) { | 108 void GPUInfo::SetGLVendor(const std::string& gl_vendor) { |
114 gl_vendor_ = gl_vendor; | 109 gl_vendor_ = gl_vendor; |
115 } | 110 } |
116 | 111 |
117 void GPUInfo::SetGLRenderer(const std::string& gl_renderer) { | 112 void GPUInfo::SetGLRenderer(const std::string& gl_renderer) { |
118 gl_renderer_ = gl_renderer; | 113 gl_renderer_ = gl_renderer; |
119 } | 114 } |
120 | 115 |
121 void GPUInfo::SetGLExtensions(const std::string& gl_extensions) { | |
122 gl_extensions_ = gl_extensions; | |
123 } | |
124 | |
125 void GPUInfo::SetCanLoseContext(bool can_lose_context) { | 116 void GPUInfo::SetCanLoseContext(bool can_lose_context) { |
126 can_lose_context_ = can_lose_context; | 117 can_lose_context_ = can_lose_context; |
127 } | 118 } |
128 | 119 |
129 #if defined(OS_WIN) | 120 #if defined(OS_WIN) |
130 const DxDiagNode& GPUInfo::dx_diagnostics() const { | 121 const DxDiagNode& GPUInfo::dx_diagnostics() const { |
131 return dx_diagnostics_; | 122 return dx_diagnostics_; |
132 } | 123 } |
133 | 124 |
134 void GPUInfo::SetDxDiagnostics(const DxDiagNode& dx_diagnostics) { | 125 void GPUInfo::SetDxDiagnostics(const DxDiagNode& dx_diagnostics) { |
135 dx_diagnostics_ = dx_diagnostics; | 126 dx_diagnostics_ = dx_diagnostics; |
136 } | 127 } |
137 #endif | 128 #endif |
OLD | NEW |