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

Unified Diff: content/common/gpu/client/command_buffer_metrics.h

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/command_buffer_metrics.h
diff --git a/content/common/gpu/client/command_buffer_metrics.h b/content/common/gpu/client/command_buffer_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..41c23020abe44d51c4a16c14773b1fbf75e7fc73
--- /dev/null
+++ b/content/common/gpu/client/command_buffer_metrics.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_
+#define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_
+
+#include <string>
+
+#include "gpu/command_buffer/common/constants.h"
+
+namespace content {
+
+enum CommandBufferContextType {
+ // Don't add new values before _MAX_ENUM to keep the histogram consistent.
Ken Russell (switch to Gerrit) 2015/04/24 02:39:41 Is this comment correct? Should it read "before" o
+ BROWSER_COMPOSITOR_ONSCREEN_CONTEXT,
+ BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT,
+ RENDER_COMPOSITOR_CONTEXT,
+ RENDER_WORKER_CONTEXT,
+ RENDERER_MAINTHREAD_CONTEXT,
+ GPU_VIDEO_ACCELERATOR_CONTEXT,
+ OFFSCREEN_VIDEO_CAPTURE_CONTEXT,
+ OFFSCREEN_CONTEXT_FOR_WEBGL,
+ CONTEXT_TYPE_UNKNOWN,
+ OFFSCREEN_CONTEXT_FOR_TESTING = CONTEXT_TYPE_UNKNOWN,
+ // Add new values above this point.
Ken Russell (switch to Gerrit) 2015/04/24 02:39:41 Above this point or above CONTEXT_TYPE_UNKNOWN?
no sievers 2015/04/24 18:52:47 Done.
+ CONTEXT_TYPE_MAX_ENUM = CONTEXT_TYPE_UNKNOWN
+ // not reported
+};
+
+std::string CommandBufferContextTypeToString(CommandBufferContextType type);
+
+void UmaRecordContextInitFailed(CommandBufferContextType type);
+
+void UmaRecordContextLost(CommandBufferContextType type,
+ gpu::error::Error error,
+ gpu::error::ContextLostReason reason);
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698