1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_METRICS_BEGIN_MAIN_FRAME_METRICS_H_
6 #define CC_METRICS_BEGIN_MAIN_FRAME_METRICS_H_
8 #include "base/time/time.h"
9 #include "cc/cc_export.h"
13 // Latency timing data for Main Frame lifecycle updates triggered by cc.
14 // The data is captured in LocalFrameViewUKMAggregator and passed back through
15 // the proxy when a main frame ends. LayerTreeHost updates the update_layers_
16 // value in LayerTreeHost::UpdateLayers.
17 // TODO(schenney): Include work done in LayerTreeHost::AnimateLayers?
18 struct CC_EXPORT BeginMainFrameMetrics {
19 base::TimeDelta handle_input_events;
20 base::TimeDelta animate;
21 base::TimeDelta style_update;
22 base::TimeDelta layout_update;
23 base::TimeDelta accessibility;
24 base::TimeDelta prepaint;
25 base::TimeDelta compositing_inputs;
26 base::TimeDelta paint;
27 base::TimeDelta composite_commit;
28 base::TimeDelta update_layers;
29 // True if we should measure smoothness in TotalFrameCounter and
30 // DroppedFrameCounter. Currently true when first contentful paint is done.
31 bool should_measure_smoothness = false;
33 BeginMainFrameMetrics();
35 BeginMainFrameMetrics(const BeginMainFrameMetrics& other);
36 BeginMainFrameMetrics& operator=(const BeginMainFrameMetrics& other);
41 #endif // CC_METRICS_BEGIN_MAIN_FRAME_METRICS_H_