Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: content/common/gpu/client/command_buffer_metrics.cc

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CommandBufferContextLostReason reason) { 72 CommandBufferContextLostReason reason) {
73 switch (type) { 73 switch (type) {
74 case BROWSER_COMPOSITOR_ONSCREEN_CONTEXT: 74 case BROWSER_COMPOSITOR_ONSCREEN_CONTEXT:
75 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserCompositor", reason, 75 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserCompositor", reason,
76 CONTEXT_LOST_REASON_MAX_ENUM); 76 CONTEXT_LOST_REASON_MAX_ENUM);
77 break; 77 break;
78 case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT: 78 case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT:
79 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserMainThread", reason, 79 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserMainThread", reason,
80 CONTEXT_LOST_REASON_MAX_ENUM); 80 CONTEXT_LOST_REASON_MAX_ENUM);
81 break; 81 break;
82 case BROWSER_WORKER_CONTEXT:
83 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserWorker", reason,
84 CONTEXT_LOST_REASON_MAX_ENUM);
85 break;
82 case RENDER_COMPOSITOR_CONTEXT: 86 case RENDER_COMPOSITOR_CONTEXT:
83 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderCompositor", reason, 87 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderCompositor", reason,
84 CONTEXT_LOST_REASON_MAX_ENUM); 88 CONTEXT_LOST_REASON_MAX_ENUM);
85 break; 89 break;
86 case RENDER_WORKER_CONTEXT: 90 case RENDER_WORKER_CONTEXT:
87 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderWorker", reason, 91 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderWorker", reason,
88 CONTEXT_LOST_REASON_MAX_ENUM); 92 CONTEXT_LOST_REASON_MAX_ENUM);
89 break; 93 break;
90 case RENDERER_MAINTHREAD_CONTEXT: 94 case RENDERER_MAINTHREAD_CONTEXT:
91 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderMainThread", reason, 95 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderMainThread", reason,
(...skipping 21 matching lines...) Expand all
113 } // anonymous namespace 117 } // anonymous namespace
114 118
115 std::string CommandBufferContextTypeToString(CommandBufferContextType type) { 119 std::string CommandBufferContextTypeToString(CommandBufferContextType type) {
116 switch (type) { 120 switch (type) {
117 case OFFSCREEN_CONTEXT_FOR_TESTING: 121 case OFFSCREEN_CONTEXT_FOR_TESTING:
118 return "Context-For-Testing"; 122 return "Context-For-Testing";
119 case BROWSER_COMPOSITOR_ONSCREEN_CONTEXT: 123 case BROWSER_COMPOSITOR_ONSCREEN_CONTEXT:
120 return "Compositor"; 124 return "Compositor";
121 case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT: 125 case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT:
122 return "Offscreen-MainThread"; 126 return "Offscreen-MainThread";
127 case BROWSER_WORKER_CONTEXT:
128 return "CompositorWorker";
123 case RENDER_COMPOSITOR_CONTEXT: 129 case RENDER_COMPOSITOR_CONTEXT:
124 return "RenderCompositor"; 130 return "RenderCompositor";
125 case RENDER_WORKER_CONTEXT: 131 case RENDER_WORKER_CONTEXT:
126 return "RenderWorker"; 132 return "RenderWorker";
127 case RENDERER_MAINTHREAD_CONTEXT: 133 case RENDERER_MAINTHREAD_CONTEXT:
128 return "Offscreen-MainThread"; 134 return "Offscreen-MainThread";
129 case GPU_VIDEO_ACCELERATOR_CONTEXT: 135 case GPU_VIDEO_ACCELERATOR_CONTEXT:
130 return "GPU-VideoAccelerator-Offscreen"; 136 return "GPU-VideoAccelerator-Offscreen";
131 case OFFSCREEN_VIDEO_CAPTURE_CONTEXT: 137 case OFFSCREEN_VIDEO_CAPTURE_CONTEXT:
132 return "Offscreen-CaptureThread"; 138 return "Offscreen-CaptureThread";
(...skipping 11 matching lines...) Expand all
144 150
145 void UmaRecordContextLost(CommandBufferContextType type, 151 void UmaRecordContextLost(CommandBufferContextType type,
146 gpu::error::Error error, 152 gpu::error::Error error,
147 gpu::error::ContextLostReason reason) { 153 gpu::error::ContextLostReason reason) {
148 CommandBufferContextLostReason converted_reason = 154 CommandBufferContextLostReason converted_reason =
149 GetContextLostReason(error, reason); 155 GetContextLostReason(error, reason);
150 RecordContextLost(type, converted_reason); 156 RecordContextLost(type, converted_reason);
151 } 157 }
152 158
153 } // namespace content 159 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_metrics.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698