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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 397443002: [not for review] Add Draw entries to window Performance Timeline Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use damage rect not viewport rect Created 6 years, 3 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 | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698