Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: gpu/config/gpu_info_collector_win.cc

Issue 660093004: Type conversion fixes, gpu/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "gpu/config/gpu_info_collector.h" 5 #include "gpu/config/gpu_info_collector.h"
6 6
7 // This has to be included before windows.h. 7 // This has to be included before windows.h.
8 #include "third_party/re2/re2/re2.h" 8 #include "third_party/re2/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return stats; 147 return stats;
148 } 148 }
149 149
150 GpuPerformanceStats RetrieveGpuPerformanceStatsWithHistograms() { 150 GpuPerformanceStats RetrieveGpuPerformanceStatsWithHistograms() {
151 base::TimeTicks start_time = base::TimeTicks::Now(); 151 base::TimeTicks start_time = base::TimeTicks::Now();
152 152
153 GpuPerformanceStats stats = RetrieveGpuPerformanceStats(); 153 GpuPerformanceStats stats = RetrieveGpuPerformanceStats();
154 154
155 UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime", 155 UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime",
156 base::TimeTicks::Now() - start_time); 156 base::TimeTicks::Now() - start_time);
157 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.OverallScore2", 157 UMA_HISTOGRAM_CUSTOM_COUNTS(
158 stats.overall * 10, 10, 200, 50); 158 "GPU.WinSAT.OverallScore2",
159 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GraphicsScore2", 159 static_cast<base::HistogramBase::Sample>(stats.overall * 10), 10, 200,
160 stats.graphics * 10, 10, 200, 50); 160 50);
161 UMA_HISTOGRAM_CUSTOM_COUNTS("GPU.WinSAT.GamingScore2", 161 UMA_HISTOGRAM_CUSTOM_COUNTS(
162 stats.gaming * 10, 10, 200, 50); 162 "GPU.WinSAT.GraphicsScore2",
163 static_cast<base::HistogramBase::Sample>(stats.graphics * 10), 10, 200,
164 50);
165 UMA_HISTOGRAM_CUSTOM_COUNTS(
166 "GPU.WinSAT.GamingScore2",
167 static_cast<base::HistogramBase::Sample>(stats.gaming * 10), 10, 200, 50);
163 UMA_HISTOGRAM_BOOLEAN( 168 UMA_HISTOGRAM_BOOLEAN(
164 "GPU.WinSAT.HasResults", 169 "GPU.WinSAT.HasResults",
165 stats.overall != 0.0 && stats.graphics != 0.0 && stats.gaming != 0.0); 170 stats.overall != 0.0 && stats.graphics != 0.0 && stats.gaming != 0.0);
166 171
167 return stats; 172 return stats;
168 } 173 }
169 174
170 // Returns the display link driver version or an invalid version if it is 175 // Returns the display link driver version or an invalid version if it is
171 // not installed. 176 // not installed.
172 Version DisplayLinkVersion() { 177 Version DisplayLinkVersion() {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 basic_gpu_info->software_rendering = true; 664 basic_gpu_info->software_rendering = true;
660 return; 665 return;
661 } 666 }
662 667
663 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 668 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
664 669
665 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 670 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
666 } 671 }
667 672
668 } // namespace gpu 673 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698