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

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

Issue 1936773002: Move attributes and context type out to ContextProviderCommandBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rmwgc3d
Patch Set: Created 4 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.cc
diff --git a/content/common/gpu/client/command_buffer_metrics.cc b/content/common/gpu/client/command_buffer_metrics.cc
index 2ff84f8b1f8d036ba1f30562197183b82a346ff7..985cd802e085d307e3127c22d18c9782dc221aac 100644
--- a/content/common/gpu/client/command_buffer_metrics.cc
+++ b/content/common/gpu/client/command_buffer_metrics.cc
@@ -7,6 +7,7 @@
#include "base/metrics/histogram.h"
namespace content {
+namespace command_buffer_metrics {
namespace {
@@ -72,7 +73,7 @@ CommandBufferContextLostReason GetContextLostReason(
return CONTEXT_LOST_UNKNOWN;
}
-void RecordContextLost(CommandBufferContextType type,
+void RecordContextLost(ContextType type,
CommandBufferContextLostReason reason) {
switch (type) {
case DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT:
@@ -120,7 +121,7 @@ void RecordContextLost(CommandBufferContextType type,
} // anonymous namespace
-std::string CommandBufferContextTypeToString(CommandBufferContextType type) {
+std::string ContextTypeToString(ContextType type) {
switch (type) {
case OFFSCREEN_CONTEXT_FOR_TESTING:
return "Context-For-Testing";
@@ -148,11 +149,11 @@ std::string CommandBufferContextTypeToString(CommandBufferContextType type) {
}
}
-void UmaRecordContextInitFailed(CommandBufferContextType type) {
+void UmaRecordContextInitFailed(ContextType type) {
RecordContextLost(type, CONTEXT_INIT_FAILED);
}
-void UmaRecordContextLost(CommandBufferContextType type,
+void UmaRecordContextLost(ContextType type,
gpu::error::Error error,
gpu::error::ContextLostReason reason) {
CommandBufferContextLostReason converted_reason =
@@ -160,4 +161,5 @@ void UmaRecordContextLost(CommandBufferContextType type,
RecordContextLost(type, converted_reason);
}
+} // namespace command_buffer_metrics
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698