| 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.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 namespace command_buffer_metrics { | 10 namespace command_buffer_metrics { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return CONTEXT_PARSE_ERROR_INVALID_SIZE; | 57 return CONTEXT_PARSE_ERROR_INVALID_SIZE; |
| 58 case gpu::error::kOutOfBounds: | 58 case gpu::error::kOutOfBounds: |
| 59 return CONTEXT_PARSE_ERROR_OUT_OF_BOUNDS; | 59 return CONTEXT_PARSE_ERROR_OUT_OF_BOUNDS; |
| 60 case gpu::error::kUnknownCommand: | 60 case gpu::error::kUnknownCommand: |
| 61 return CONTEXT_PARSE_ERROR_UNKNOWN_COMMAND; | 61 return CONTEXT_PARSE_ERROR_UNKNOWN_COMMAND; |
| 62 case gpu::error::kInvalidArguments: | 62 case gpu::error::kInvalidArguments: |
| 63 return CONTEXT_PARSE_ERROR_INVALID_ARGS; | 63 return CONTEXT_PARSE_ERROR_INVALID_ARGS; |
| 64 case gpu::error::kGenericError: | 64 case gpu::error::kGenericError: |
| 65 return CONTEXT_PARSE_ERROR_GENERIC_ERROR; | 65 return CONTEXT_PARSE_ERROR_GENERIC_ERROR; |
| 66 case gpu::error::kDeferCommandUntilLater: | 66 case gpu::error::kDeferCommandUntilLater: |
| 67 case gpu::error::kDeferLaterCommands: |
| 67 case gpu::error::kNoError: | 68 case gpu::error::kNoError: |
| 68 case gpu::error::kLostContext: | 69 case gpu::error::kLostContext: |
| 69 NOTREACHED(); | 70 NOTREACHED(); |
| 70 return CONTEXT_LOST_UNKNOWN; | 71 return CONTEXT_LOST_UNKNOWN; |
| 71 } | 72 } |
| 72 NOTREACHED(); | 73 NOTREACHED(); |
| 73 return CONTEXT_LOST_UNKNOWN; | 74 return CONTEXT_LOST_UNKNOWN; |
| 74 } | 75 } |
| 75 | 76 |
| 76 void RecordContextLost(ContextType type, | 77 void RecordContextLost(ContextType type, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void UmaRecordContextLost(ContextType type, | 163 void UmaRecordContextLost(ContextType type, |
| 163 gpu::error::Error error, | 164 gpu::error::Error error, |
| 164 gpu::error::ContextLostReason reason) { | 165 gpu::error::ContextLostReason reason) { |
| 165 CommandBufferContextLostReason converted_reason = | 166 CommandBufferContextLostReason converted_reason = |
| 166 GetContextLostReason(error, reason); | 167 GetContextLostReason(error, reason); |
| 167 RecordContextLost(type, converted_reason); | 168 RecordContextLost(type, converted_reason); |
| 168 } | 169 } |
| 169 | 170 |
| 170 } // namespace command_buffer_metrics | 171 } // namespace command_buffer_metrics |
| 171 } // namespace content | 172 } // namespace content |
| OLD | NEW |