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

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

Issue 1336703002: Revert of Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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;
86 case RENDER_COMPOSITOR_CONTEXT: 82 case RENDER_COMPOSITOR_CONTEXT:
87 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderCompositor", reason, 83 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderCompositor", reason,
88 CONTEXT_LOST_REASON_MAX_ENUM); 84 CONTEXT_LOST_REASON_MAX_ENUM);
89 break; 85 break;
90 case RENDER_WORKER_CONTEXT: 86 case RENDER_WORKER_CONTEXT:
91 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderWorker", reason, 87 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderWorker", reason,
92 CONTEXT_LOST_REASON_MAX_ENUM); 88 CONTEXT_LOST_REASON_MAX_ENUM);
93 break; 89 break;
94 case RENDERER_MAINTHREAD_CONTEXT: 90 case RENDERER_MAINTHREAD_CONTEXT:
95 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderMainThread", reason, 91 UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderMainThread", reason,
(...skipping 21 matching lines...) Expand all
117 } // anonymous namespace 113 } // anonymous namespace
118 114
119 std::string CommandBufferContextTypeToString(CommandBufferContextType type) { 115 std::string CommandBufferContextTypeToString(CommandBufferContextType type) {
120 switch (type) { 116 switch (type) {
121 case OFFSCREEN_CONTEXT_FOR_TESTING: 117 case OFFSCREEN_CONTEXT_FOR_TESTING:
122 return "Context-For-Testing"; 118 return "Context-For-Testing";
123 case BROWSER_COMPOSITOR_ONSCREEN_CONTEXT: 119 case BROWSER_COMPOSITOR_ONSCREEN_CONTEXT:
124 return "Compositor"; 120 return "Compositor";
125 case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT: 121 case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT:
126 return "Offscreen-MainThread"; 122 return "Offscreen-MainThread";
127 case BROWSER_WORKER_CONTEXT:
128 return "CompositorWorker";
129 case RENDER_COMPOSITOR_CONTEXT: 123 case RENDER_COMPOSITOR_CONTEXT:
130 return "RenderCompositor"; 124 return "RenderCompositor";
131 case RENDER_WORKER_CONTEXT: 125 case RENDER_WORKER_CONTEXT:
132 return "RenderWorker"; 126 return "RenderWorker";
133 case RENDERER_MAINTHREAD_CONTEXT: 127 case RENDERER_MAINTHREAD_CONTEXT:
134 return "Offscreen-MainThread"; 128 return "Offscreen-MainThread";
135 case GPU_VIDEO_ACCELERATOR_CONTEXT: 129 case GPU_VIDEO_ACCELERATOR_CONTEXT:
136 return "GPU-VideoAccelerator-Offscreen"; 130 return "GPU-VideoAccelerator-Offscreen";
137 case OFFSCREEN_VIDEO_CAPTURE_CONTEXT: 131 case OFFSCREEN_VIDEO_CAPTURE_CONTEXT:
138 return "Offscreen-CaptureThread"; 132 return "Offscreen-CaptureThread";
(...skipping 11 matching lines...) Expand all
150 144
151 void UmaRecordContextLost(CommandBufferContextType type, 145 void UmaRecordContextLost(CommandBufferContextType type,
152 gpu::error::Error error, 146 gpu::error::Error error,
153 gpu::error::ContextLostReason reason) { 147 gpu::error::ContextLostReason reason) {
154 CommandBufferContextLostReason converted_reason = 148 CommandBufferContextLostReason converted_reason =
155 GetContextLostReason(error, reason); 149 GetContextLostReason(error, reason);
156 RecordContextLost(type, converted_reason); 150 RecordContextLost(type, converted_reason);
157 } 151 }
158 152
159 } // namespace content 153 } // 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