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

Unified Diff: cc/scheduler/scheduler.cc

Issue 1213653005: Revert of cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: Created 5 years, 5 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/scheduler.h ('k') | cc/scheduler/scheduler_unittest.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 cd0d37ea2a81c32d1d37d6698b3cf04c296d6e47..657871d810c57dc3b32f6bb847b736fb644324c5 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -131,7 +131,6 @@
void Scheduler::SetVisible(bool visible) {
state_machine_.SetVisible(visible);
- UpdateCompositorTimingHistoryRecordingEnabled();
ProcessScheduledActions();
}
@@ -141,7 +140,6 @@
}
void Scheduler::NotifyReadyToActivate() {
- compositor_timing_history_->ReadyToActivate();
state_machine_.NotifyReadyToActivate();
ProcessScheduledActions();
}
@@ -219,24 +217,14 @@
ProcessScheduledActions();
}
-void Scheduler::DidCommit() {
- compositor_timing_history_->DidCommit();
-}
-
void Scheduler::BeginMainFrameAborted(CommitEarlyOutReason reason) {
TRACE_EVENT1("cc", "Scheduler::BeginMainFrameAborted", "reason",
CommitEarlyOutReasonToString(reason));
- compositor_timing_history_->BeginMainFrameAborted();
state_machine_.BeginMainFrameAborted(reason);
ProcessScheduledActions();
}
-void Scheduler::WillPrepareTiles() {
- compositor_timing_history_->WillPrepareTiles();
-}
-
void Scheduler::DidPrepareTiles() {
- compositor_timing_history_->DidPrepareTiles();
state_machine_.DidPrepareTiles();
}
@@ -245,7 +233,6 @@
begin_retro_frame_args_.clear();
begin_retro_frame_task_.Cancel();
state_machine_.DidLoseOutputSurface();
- UpdateCompositorTimingHistoryRecordingEnabled();
ProcessScheduledActions();
}
@@ -254,7 +241,6 @@
DCHECK(!frame_source_->NeedsBeginFrames());
DCHECK(begin_impl_frame_deadline_task_.IsCancelled());
state_machine_.DidCreateAndInitializeOutputSurface();
- UpdateCompositorTimingHistoryRecordingEnabled();
ProcessScheduledActions();
}
@@ -593,16 +579,16 @@
}
void Scheduler::DrawAndSwapIfPossible() {
- compositor_timing_history_->WillDraw();
+ compositor_timing_history_->DidStartDrawing();
DrawResult result = client_->ScheduledActionDrawAndSwapIfPossible();
state_machine_.DidDrawIfPossibleCompleted(result);
- compositor_timing_history_->DidDraw();
+ compositor_timing_history_->DidFinishDrawing();
}
void Scheduler::DrawAndSwapForced() {
- compositor_timing_history_->WillDraw();
+ compositor_timing_history_->DidStartDrawing();
client_->ScheduledActionDrawAndSwapForced();
- compositor_timing_history_->DidDraw();
+ compositor_timing_history_->DidFinishDrawing();
}
void Scheduler::SetDeferCommits(bool defer_commits) {
@@ -648,12 +634,12 @@
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"461509 Scheduler::ProcessScheduledActions4"));
client_->ScheduledActionCommit();
+ compositor_timing_history_->DidCommit();
break;
}
case SchedulerStateMachine::ACTION_ACTIVATE_SYNC_TREE:
- compositor_timing_history_->WillActivate();
client_->ScheduledActionActivateSyncTree();
- compositor_timing_history_->DidActivate();
+ compositor_timing_history_->DidActivateSyncTree();
break;
case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE: {
// TODO(robliao): Remove ScopedTracker below once crbug.com/461509 is
@@ -735,11 +721,6 @@
state->EndDictionary();
}
-void Scheduler::UpdateCompositorTimingHistoryRecordingEnabled() {
- compositor_timing_history_->SetRecordingEnabled(
- state_machine_.HasInitializedOutputSurface() && state_machine_.visible());
-}
-
bool Scheduler::CanCommitAndActivateBeforeDeadline() const {
BeginFrameArgs args =
begin_impl_frame_tracker_.DangerousMethodCurrentOrLast();
@@ -749,8 +730,7 @@
base::TimeTicks estimated_draw_time =
args.frame_time +
compositor_timing_history_->BeginMainFrameToCommitDurationEstimate() +
- compositor_timing_history_->CommitToReadyToActivateDurationEstimate() +
- compositor_timing_history_->ActivateDurationEstimate();
+ compositor_timing_history_->CommitToActivateDurationEstimate();
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"),
"CanCommitAndActivateBeforeDeadline",
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698