Commit 53418dca authored by zmo's avatar zmo Committed by Commit bot

Add more logging to cc scheduler to debug RAF frame loss.

BUG=393331
TEST=bots
R=brianderson@chromium.org

Review URL: https://codereview.chromium.org/533973002

Cr-Commit-Position: refs/heads/master@{#293046}
parent d81a8daf
......@@ -632,6 +632,9 @@ void Scheduler::ProcessScheduledActions() {
"SchedulerStateMachine",
"state",
AsValue());
VLOG(2) << "Scheduler::ProcessScheduledActions: "
<< SchedulerStateMachine::ActionToString(action) << " "
<< state_machine_.GetStatesForDebugging();
state_machine_.UpdateState(action);
base::AutoReset<SchedulerStateMachine::Action>
mark_inside_action(&inside_action_, action);
......@@ -642,8 +645,6 @@ void Scheduler::ProcessScheduledActions() {
client_->ScheduledActionAnimate();
break;
case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME:
VLOG(2) << "Scheduler::ProcessScheduledActions: "
"ACTION_SEND_BEGIN_MAIN_FRAME";
client_->ScheduledActionSendBeginMainFrame();
break;
case SchedulerStateMachine::ACTION_COMMIT:
......
......@@ -1086,4 +1086,17 @@ bool SchedulerStateMachine::HasInitializedOutputSurface() const {
return false;
}
std::string SchedulerStateMachine::GetStatesForDebugging() const {
return base::StringPrintf("%c %d %d %d %c %c %c %d %d",
needs_commit_ ? 'T' : 'F',
static_cast<int>(output_surface_state_),
static_cast<int>(begin_impl_frame_state_),
static_cast<int>(commit_state_),
has_pending_tree_ ? 'T' : 'F',
pending_tree_is_ready_for_activation_ ? 'T' : 'F',
active_tree_needs_first_draw_ ? 'T' : 'F',
max_pending_swaps_,
pending_swaps_);
}
} // namespace cc
......@@ -237,6 +237,10 @@ class CC_EXPORT SchedulerStateMachine {
bool CouldSendBeginMainFrame() const;
// TODO(zmo): This is temporary for debugging crbug.com/393331.
// We should remove it afterwards.
std::string GetStatesForDebugging() const;
protected:
bool BeginFrameNeededToAnimateOrDraw() const;
bool ProactiveBeginFrameWanted() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment