| 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 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "gpu/command_buffer/common/constants.h" | 10 #include "gpu/command_buffer/common/constants.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 namespace command_buffer_metrics { | 13 namespace command_buffer_metrics { |
| 14 | 14 |
| 15 enum ContextType { | 15 enum ContextType { |
| 16 DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT, | 16 DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT, |
| 17 BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT, | 17 BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT, |
| 18 BROWSER_WORKER_CONTEXT, | 18 BROWSER_WORKER_CONTEXT, |
| 19 RENDER_COMPOSITOR_CONTEXT, | 19 RENDER_COMPOSITOR_CONTEXT, |
| 20 RENDER_WORKER_CONTEXT, | 20 RENDER_WORKER_CONTEXT, |
| 21 RENDERER_MAINTHREAD_CONTEXT, | 21 RENDERER_MAINTHREAD_CONTEXT, |
| 22 GPU_VIDEO_ACCELERATOR_CONTEXT, | 22 GPU_VIDEO_ACCELERATOR_CONTEXT, |
| 23 OFFSCREEN_VIDEO_CAPTURE_CONTEXT, | 23 OFFSCREEN_VIDEO_CAPTURE_CONTEXT, |
| 24 OFFSCREEN_CONTEXT_FOR_WEBGL, | 24 OFFSCREEN_CONTEXT_FOR_WEBGL, |
| 25 CONTEXT_TYPE_UNKNOWN, | 25 CONTEXT_TYPE_UNKNOWN, |
| 26 MEDIA_CONTEXT, | 26 MEDIA_CONTEXT, |
| 27 BLIMP_RENDER_COMPOSITOR_CONTEXT, | 27 BLIMP_RENDER_COMPOSITOR_CONTEXT, |
| 28 BLIMP_RENDER_WORKER_CONTEXT, | 28 BLIMP_RENDER_WORKER_CONTEXT, |
| 29 MUS_CLIENT_CONTEXT, |
| 29 OFFSCREEN_CONTEXT_FOR_TESTING = CONTEXT_TYPE_UNKNOWN, | 30 OFFSCREEN_CONTEXT_FOR_TESTING = CONTEXT_TYPE_UNKNOWN, |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 std::string ContextTypeToString(ContextType type); | 33 std::string ContextTypeToString(ContextType type); |
| 33 | 34 |
| 34 void UmaRecordContextInitFailed(ContextType type); | 35 void UmaRecordContextInitFailed(ContextType type); |
| 35 | 36 |
| 36 void UmaRecordContextLost(ContextType type, | 37 void UmaRecordContextLost(ContextType type, |
| 37 gpu::error::Error error, | 38 gpu::error::Error error, |
| 38 gpu::error::ContextLostReason reason); | 39 gpu::error::ContextLostReason reason); |
| 39 | 40 |
| 40 } // namespace command_buffer_metrics | 41 } // namespace command_buffer_metrics |
| 41 } // namespace ui | 42 } // namespace ui |
| 42 | 43 |
| 43 #endif // SERVICES_UI_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_ | 44 #endif // SERVICES_UI_PUBLIC_CPP_GPU_COMMAND_BUFFER_METRICS_H_ |
| OLD | NEW |