OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/gpu/gpu_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 int entry_index = static_cast<int>(sub_version) * kGpuFeatureNumStatus; | 92 int entry_index = static_cast<int>(sub_version) * kGpuFeatureNumStatus; |
93 switch (status) { | 93 switch (status) { |
94 case kGpuFeatureEnabled: | 94 case kGpuFeatureEnabled: |
95 break; | 95 break; |
96 case kGpuFeatureBlacklisted: | 96 case kGpuFeatureBlacklisted: |
97 entry_index++; | 97 entry_index++; |
98 break; | 98 break; |
99 case kGpuFeatureDisabled: | 99 case kGpuFeatureDisabled: |
100 entry_index += 2; | 100 entry_index += 2; |
101 break; | 101 break; |
| 102 case kGpuFeatureNumStatus: |
| 103 NOTREACHED(); |
| 104 break; |
102 } | 105 } |
103 return entry_index; | 106 return entry_index; |
104 } | 107 } |
105 #endif // OS_WIN | 108 #endif // OS_WIN |
106 | 109 |
107 // Send UMA histograms about the enabled features and GPU properties. | 110 // Send UMA histograms about the enabled features and GPU properties. |
108 void UpdateStats(const gpu::GPUInfo& gpu_info, | 111 void UpdateStats(const gpu::GPUInfo& gpu_info, |
109 const gpu::GpuBlacklist* blacklist, | 112 const gpu::GpuBlacklist* blacklist, |
110 const std::set<int>& blacklisted_features) { | 113 const std::set<int>& blacklisted_features) { |
111 uint32 max_entry_id = blacklist->max_entry_id(); | 114 uint32 max_entry_id = blacklist->max_entry_id(); |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1205 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1203 #if defined(OS_WIN) | 1206 #if defined(OS_WIN) |
1204 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1207 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1205 #endif | 1208 #endif |
1206 complete_gpu_info_already_requested_ = true; | 1209 complete_gpu_info_already_requested_ = true; |
1207 // Some observers might be waiting. | 1210 // Some observers might be waiting. |
1208 NotifyGpuInfoUpdate(); | 1211 NotifyGpuInfoUpdate(); |
1209 } | 1212 } |
1210 | 1213 |
1211 } // namespace content | 1214 } // namespace content |
OLD | NEW |