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

Unified Diff: cc/trees/thread_proxy.cc

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 5 years, 10 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
« cc/trees/layer_tree_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index db69b8203def40e71e3bf89575907a0be09da1ee..2260d12c59d39fc96a327f17fcf4b487cb331aa3 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -685,6 +685,8 @@ void ThreadProxy::ScheduledActionSendBeginMainFrame() {
impl().layer_tree_host_impl->memory_allocation_priority_cutoff();
begin_main_frame_state->evicted_ui_resources =
impl().layer_tree_host_impl->EvictedUIResourcesExist();
+ impl().layer_tree_host_impl->SetBeginMainFrameTime(
+ impl().scheduler->LastBeginImplFrameTime());
Proxy::MainThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&ThreadProxy::BeginMainFrame,
@@ -917,8 +919,10 @@ void ThreadProxy::BeginMainFrameAbortedOnImplThread(
DCHECK(impl().scheduler->CommitPending());
DCHECK(!impl().layer_tree_host_impl->pending_tree());
- if (CommitEarlyOutHandledCommit(reason))
+ if (CommitEarlyOutHandledCommit(reason)) {
SetInputThrottledUntilCommitOnImplThread(false);
+ impl().layer_tree_host_impl->RecordMainFrameTiming();
+ }
impl().layer_tree_host_impl->BeginMainFrameAborted(reason);
impl().scheduler->BeginMainFrameAborted(reason);
}
@@ -1374,4 +1378,9 @@ void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
main_thread_weak_ptr_));
}
+base::TimeTicks ThreadProxy::GetNextBeginImplFrameTimeIfRequested() const {
+ DCHECK(IsImplThread());
+ return impl().scheduler->NextBeginImplFrameTimeIfRequested();
+}
+
} // namespace cc
« cc/trees/layer_tree_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698