| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index dce1d42e11d071384b5f9ee1dcaaa2b82446e791..1d9fd35237332cd74348bcb813eae4e4aa198388 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
| #include <stack>
|
| #include <string>
|
| +#include <utility>
|
|
|
| #include "base/atomic_sequence_num.h"
|
| #include "base/bind.h"
|
| @@ -40,6 +41,7 @@
|
| #include "cc/trees/single_thread_proxy.h"
|
| #include "cc/trees/thread_proxy.h"
|
| #include "cc/trees/tree_synchronizer.h"
|
| +#include "ui/gfx/frame_time.h"
|
| #include "ui/gfx/size_conversions.h"
|
|
|
| namespace {
|
| @@ -1053,6 +1055,16 @@ void LayerTreeHost::PaintLayerContents(
|
| it->IsSuitableForGpuRasterization();
|
| }
|
|
|
| + if (*did_paint_content && it->smoothness_timing_requests().size()) {
|
| + const std::vector<std::pair<int64_t, gfx::Rect> >& vec =
|
| + it->smoothness_timing_requests();
|
| + std::pair<int, base::TimeTicks> timestamp(source_frame_number(),
|
| + gfx::FrameTime::Now());
|
| + for (size_t i = 0; i < vec.size(); ++i) {
|
| + client_->RecordCommitTiming(vec[i].first, timestamp);
|
| + }
|
| + }
|
| +
|
| occlusion_tracker.LeaveLayer(it);
|
| }
|
|
|
| @@ -1120,6 +1132,16 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
|
| }
|
| }
|
|
|
| +void LayerTreeHost::RecordCompositeTiming(const CompositeTimingSet& info) {
|
| + if (!root_layer_.get())
|
| + return;
|
| +
|
| + for (size_t i = 0; i < info.composites.size(); ++i) {
|
| + client_->RecordCompositeTiming(info.composites[i].rect_id,
|
| + info.composites[i].timestamps);
|
| + }
|
| +}
|
| +
|
| void LayerTreeHost::StartRateLimiter() {
|
| if (inside_begin_main_frame_)
|
| return;
|
|
|