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 CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_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 content { | 12 namespace content { |
13 | 13 |
14 enum CommandBufferContextType { | 14 enum CommandBufferContextType { |
15 BROWSER_COMPOSITOR_ONSCREEN_CONTEXT, | 15 BROWSER_COMPOSITOR_ONSCREEN_CONTEXT, |
16 BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT, | 16 BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT, |
| 17 BROWSER_WORKER_CONTEXT, |
17 RENDER_COMPOSITOR_CONTEXT, | 18 RENDER_COMPOSITOR_CONTEXT, |
18 RENDER_WORKER_CONTEXT, | 19 RENDER_WORKER_CONTEXT, |
19 RENDERER_MAINTHREAD_CONTEXT, | 20 RENDERER_MAINTHREAD_CONTEXT, |
20 GPU_VIDEO_ACCELERATOR_CONTEXT, | 21 GPU_VIDEO_ACCELERATOR_CONTEXT, |
21 OFFSCREEN_VIDEO_CAPTURE_CONTEXT, | 22 OFFSCREEN_VIDEO_CAPTURE_CONTEXT, |
22 OFFSCREEN_CONTEXT_FOR_WEBGL, | 23 OFFSCREEN_CONTEXT_FOR_WEBGL, |
23 CONTEXT_TYPE_UNKNOWN, | 24 CONTEXT_TYPE_UNKNOWN, |
24 OFFSCREEN_CONTEXT_FOR_TESTING = CONTEXT_TYPE_UNKNOWN, | 25 OFFSCREEN_CONTEXT_FOR_TESTING = CONTEXT_TYPE_UNKNOWN, |
25 }; | 26 }; |
26 | 27 |
27 std::string CommandBufferContextTypeToString(CommandBufferContextType type); | 28 std::string CommandBufferContextTypeToString(CommandBufferContextType type); |
28 | 29 |
29 void UmaRecordContextInitFailed(CommandBufferContextType type); | 30 void UmaRecordContextInitFailed(CommandBufferContextType type); |
30 | 31 |
31 void UmaRecordContextLost(CommandBufferContextType type, | 32 void UmaRecordContextLost(CommandBufferContextType type, |
32 gpu::error::Error error, | 33 gpu::error::Error error, |
33 gpu::error::ContextLostReason reason); | 34 gpu::error::ContextLostReason reason); |
34 | 35 |
35 } // namespace content | 36 } // namespace content |
36 | 37 |
37 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_ | 38 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_ |
OLD | NEW |