OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/gpu/gpu_info_collector.h" | 5 #include "content/gpu/gpu_info_collector.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <d3d9.h> | 8 #include <d3d9.h> |
9 #include <setupapi.h> | 9 #include <setupapi.h> |
10 | 10 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 stats.gaming = ReadXMLFloatValue(&reader); | 129 stats.gaming = ReadXMLFloatValue(&reader); |
130 } | 130 } |
131 | 131 |
132 if (stats.overall == 0.0) | 132 if (stats.overall == 0.0) |
133 LOG(ERROR) << "Could not read overall score from assessment results."; | 133 LOG(ERROR) << "Could not read overall score from assessment results."; |
134 if (stats.graphics == 0.0) | 134 if (stats.graphics == 0.0) |
135 LOG(ERROR) << "Could not read graphics score from assessment results."; | 135 LOG(ERROR) << "Could not read graphics score from assessment results."; |
136 if (stats.gaming == 0.0) | 136 if (stats.gaming == 0.0) |
137 LOG(ERROR) << "Could not read gaming score from assessment results."; | 137 LOG(ERROR) << "Could not read gaming score from assessment results."; |
138 | 138 |
139 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.OverallScore", | 139 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.OverallScore2", |
140 stats.overall, 0.0, 50.0, 50); | 140 stats.overall * 10, 10, 200, 50); |
141 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GraphicsScore", | 141 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GraphicsScore2", |
142 stats.graphics, 0.0, 50.0, 50); | 142 stats.graphics * 10, 10, 200, 50); |
143 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GamingScore", | 143 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GamingScore2", |
144 stats.gaming, 0.0, 50.0, 50); | 144 stats.gaming * 10, 10, 200, 50); |
145 | 145 |
146 UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime", | 146 UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime", |
147 base::TimeTicks::Now() - start_time); | 147 base::TimeTicks::Now() - start_time); |
148 | 148 |
149 return stats; | 149 return stats; |
150 } | 150 } |
151 | 151 |
152 } // namespace anonymous | 152 } // namespace anonymous |
153 | 153 |
154 namespace gpu_info_collector { | 154 namespace gpu_info_collector { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 size_t pos = gl_version_string.find_last_not_of("0123456789."); | 389 size_t pos = gl_version_string.find_last_not_of("0123456789."); |
390 if (pos != std::string::npos && pos < gl_version_string.length() - 1) { | 390 if (pos != std::string::npos && pos < gl_version_string.length() - 1) { |
391 gpu_info->driver_version = gl_version_string.substr(pos + 1); | 391 gpu_info->driver_version = gl_version_string.substr(pos + 1); |
392 return true; | 392 return true; |
393 } | 393 } |
394 return false; | 394 return false; |
395 } | 395 } |
396 | 396 |
397 } // namespace gpu_info_collector | 397 } // namespace gpu_info_collector |
OLD | NEW |