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

Unified Diff: ui/compositor/layer.cc

Issue 2631333002: [animations] Adds metrics for jank on selected layer animations (Closed)
Patch Set: Adds UMA reporting for ripples and overview mode (query refresh rate) 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
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_animation_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 7d9c07b32e4f20ca9d93f3ec46617f1606449cb6..8cfa1c02f85dd8b2858a1237749fd4fecdbdc46c 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -1082,6 +1082,16 @@ LayerAnimatorCollection* Layer::GetLayerAnimatorCollection() {
return compositor ? compositor->layer_animator_collection() : NULL;
}
+int Layer::GetFrameNumber() const {
+ const Compositor* compositor = GetCompositor();
+ return compositor ? compositor->committed_frame_number() : 0;
+}
+
+float Layer::GetRefreshRate() const {
+ const Compositor* compositor = GetCompositor();
+ return compositor ? compositor->refresh_rate() : 60.0;
+}
+
cc::Layer* Layer::GetCcLayer() const {
return cc_layer_;
}
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698