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

Unified Diff: cc/scheduler/scheduler.cc

Issue 1020993002: cc: Do not pass BeginFrameArgs to state machine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 3b20b7983aac737cf1fb474b59e2cfd5938857dc..72c771f0d7cd99b8641c2fa0cf40ed8ead41ed8b 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -537,7 +537,7 @@ void Scheduler::BeginImplFrame(const BeginFrameArgs& args) {
state_machine_.SetSkipNextBeginMainFrameToReduceLatency();
}
- state_machine_.OnBeginImplFrame(begin_impl_frame_args_);
+ state_machine_.OnBeginImplFrame();
devtools_instrumentation::DidBeginFrame(layer_tree_host_id_);
client_->WillBeginImplFrame(begin_impl_frame_args_);
@@ -800,7 +800,7 @@ scoped_refptr<base::trace_event::ConvertableToTraceFormat> Scheduler::AsValue()
void Scheduler::AsValueInto(base::trace_event::TracedValue* state) const {
state->BeginDictionary("state_machine");
- state_machine_.AsValueInto(state, Now());
+ state_machine_.AsValueInto(state);
state->EndDictionary();
// Only trace frame sources when explicitly enabled - http://crbug.com/420607
@@ -834,6 +834,23 @@ void Scheduler::AsValueInto(base::trace_event::TracedValue* state) const {
begin_impl_frame_args_.AsValueInto(state);
state->EndDictionary();
+ base::TimeTicks now = Now();
+ base::TimeTicks frame_time = begin_impl_frame_args_.frame_time;
+ base::TimeTicks deadline = begin_impl_frame_args_.deadline;
+ base::TimeDelta interval = begin_impl_frame_args_.interval;
+ state->BeginDictionary("major_timestamps_in_ms");
+ state->SetDouble("0_interval", interval.InMillisecondsF());
+ state->SetDouble("1_now_to_deadline", (deadline - now).InMillisecondsF());
+ state->SetDouble("2_frame_time_to_now", (now - frame_time).InMillisecondsF());
+ state->SetDouble("3_frame_time_to_deadline",
+ (deadline - frame_time).InMillisecondsF());
+ state->SetDouble("4_now", (now - base::TimeTicks()).InMillisecondsF());
+ state->SetDouble("5_frame_time",
+ (frame_time - base::TimeTicks()).InMillisecondsF());
+ state->SetDouble("6_deadline",
+ (deadline - base::TimeTicks()).InMillisecondsF());
+ state->EndDictionary();
+
state->EndDictionary();
state->BeginDictionary("client_state");
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698