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

Unified Diff: ui/compositor/animation_metrics_reporter_template.h

Issue 2631333002: [animations] Adds metrics for jank on selected layer animations (Closed)
Patch Set: Adds UMA reporting for ripples and overview mode (extern constexpr) Created 3 years, 11 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: ui/compositor/animation_metrics_reporter_template.h
diff --git a/ui/compositor/animation_metrics_reporter_template.h b/ui/compositor/animation_metrics_reporter_template.h
new file mode 100644
index 0000000000000000000000000000000000000000..1f3224970c7efcc98d84a44ea316c6c869e91c08
--- /dev/null
+++ b/ui/compositor/animation_metrics_reporter_template.h
@@ -0,0 +1,20 @@
+// Copyright 2017 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 UI_ANIMATION_METRICS_REPORTER_TEMPLATE_H_
+#define UI_ANIMATION_METRICS_REPORTER_TEMPLATE_H_
+
+#include "base/metrics/histogram_macros.h"
+#include "ui/compositor/layer_animation_element.h"
+
+namespace ui {
+
+template <const char* name>
+class AnimationMetricsReporterTemplate : public AnimationMetricsReporter {
+ void Report(int value) override { UMA_HISTOGRAM_PERCENTAGE(name, value); }
rkaplow 2017/01/23 15:47:18 you can't use the macros this way: https://codesea
varkha 2017/01/24 00:18:57 The intention here was exactly to make the strings
+};
+
+} // namespace ui
+
+#endif // UI_ANIMATION_METRICS_REPORTER_TEMPLATE_H_
« no previous file with comments | « ui/compositor/BUILD.gn ('k') | ui/compositor/compositor.h » ('j') | ui/compositor/compositor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698