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

Unified Diff: cc/scheduler/scheduler.cc

Issue 1681393003: cc: Add MainAndImplFrameTimeDelta UMA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - active_tree_needs_first_draw_ = true Created 4 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
« no previous file with comments | « cc/scheduler/compositor_timing_history_unittest.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('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 499fae753c6f1ca009bca5cfe1b5e44bc23dd445..61607de636c5fe9ddea388e3cd881f2031c65036 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -249,8 +249,8 @@ void Scheduler::DidCreateAndInitializeOutputSurface() {
TRACE_EVENT0("cc", "Scheduler::DidCreateAndInitializeOutputSurface");
DCHECK(!observing_frame_source_);
DCHECK(begin_impl_frame_deadline_task_.IsCancelled());
- compositor_timing_history_->DidSwapBuffersReset();
state_machine_.DidCreateAndInitializeOutputSurface();
+ compositor_timing_history_->DidCreateAndInitializeOutputSurface();
UpdateCompositorTimingHistoryRecordingEnabled();
ProcessScheduledActions();
}
@@ -663,21 +663,29 @@ void Scheduler::OnBeginImplFrameDeadline() {
void Scheduler::DrawAndSwapIfPossible() {
bool drawing_with_new_active_tree =
state_machine_.active_tree_needs_first_draw();
+ bool main_thread_missed_last_deadline =
+ state_machine_.main_thread_missed_last_deadline();
compositor_timing_history_->WillDraw();
state_machine_.WillDraw();
DrawResult result = client_->ScheduledActionDrawAndSwapIfPossible();
state_machine_.DidDraw(result);
- compositor_timing_history_->DidDraw(drawing_with_new_active_tree);
+ compositor_timing_history_->DidDraw(
+ drawing_with_new_active_tree, main_thread_missed_last_deadline,
+ begin_impl_frame_tracker_.DangerousMethodCurrentOrLast().frame_time);
}
void Scheduler::DrawAndSwapForced() {
bool drawing_with_new_active_tree =
state_machine_.active_tree_needs_first_draw();
+ bool main_thread_missed_last_deadline =
+ state_machine_.main_thread_missed_last_deadline();
compositor_timing_history_->WillDraw();
state_machine_.WillDraw();
DrawResult result = client_->ScheduledActionDrawAndSwapForced();
state_machine_.DidDraw(result);
- compositor_timing_history_->DidDraw(drawing_with_new_active_tree);
+ compositor_timing_history_->DidDraw(
+ drawing_with_new_active_tree, main_thread_missed_last_deadline,
+ begin_impl_frame_tracker_.DangerousMethodCurrentOrLast().frame_time);
}
void Scheduler::SetDeferCommits(bool defer_commits) {
@@ -710,7 +718,8 @@ void Scheduler::ProcessScheduledActions() {
break;
case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME:
compositor_timing_history_->WillBeginMainFrame(
- begin_main_frame_args_.on_critical_path);
+ begin_main_frame_args_.on_critical_path,
+ begin_main_frame_args_.frame_time);
state_machine_.WillSendBeginMainFrame();
// TODO(brianderson): Pass begin_main_frame_args_ directly to client.
client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
@@ -748,6 +757,7 @@ void Scheduler::ProcessScheduledActions() {
// No action is actually performed, but this allows the state machine to
// drain the pipeline without actually drawing.
state_machine_.AbortDrawAndSwap();
+ compositor_timing_history_->DrawAborted();
break;
}
case SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_CREATION:
« no previous file with comments | « cc/scheduler/compositor_timing_history_unittest.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698