OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/common/gpu/client/command_buffer_metrics.h" | 5 #include "content/common/gpu/client/command_buffer_metrics.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram_macros.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 namespace command_buffer_metrics { | 10 namespace command_buffer_metrics { |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 enum CommandBufferContextLostReason { | 14 enum CommandBufferContextLostReason { |
15 // Don't add new values here. | 15 // Don't add new values here. |
16 CONTEXT_INIT_FAILED, | 16 CONTEXT_INIT_FAILED, |
17 CONTEXT_LOST_GPU_CHANNEL_ERROR, | 17 CONTEXT_LOST_GPU_CHANNEL_ERROR, |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void UmaRecordContextLost(ContextType type, | 173 void UmaRecordContextLost(ContextType type, |
174 gpu::error::Error error, | 174 gpu::error::Error error, |
175 gpu::error::ContextLostReason reason) { | 175 gpu::error::ContextLostReason reason) { |
176 CommandBufferContextLostReason converted_reason = | 176 CommandBufferContextLostReason converted_reason = |
177 GetContextLostReason(error, reason); | 177 GetContextLostReason(error, reason); |
178 RecordContextLost(type, converted_reason); | 178 RecordContextLost(type, converted_reason); |
179 } | 179 } |
180 | 180 |
181 } // namespace command_buffer_metrics | 181 } // namespace command_buffer_metrics |
182 } // namespace content | 182 } // namespace content |
OLD | NEW |