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

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 2752573002: Add BeginFrameLatency UMA (Closed)
Patch Set: Skip frames that originate from BeginFrameArgs::MISSED args Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), 617 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"),
618 "SchedulerStateMachine", "state", AsValue()); 618 "SchedulerStateMachine", "state", AsValue());
619 base::AutoReset<SchedulerStateMachine::Action> mark_inside_action( 619 base::AutoReset<SchedulerStateMachine::Action> mark_inside_action(
620 &inside_action_, action); 620 &inside_action_, action);
621 switch (action) { 621 switch (action) {
622 case SchedulerStateMachine::ACTION_NONE: 622 case SchedulerStateMachine::ACTION_NONE:
623 break; 623 break;
624 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: 624 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME:
625 compositor_timing_history_->WillBeginMainFrame( 625 compositor_timing_history_->WillBeginMainFrame(
626 begin_main_frame_args_.on_critical_path, 626 begin_main_frame_args_.on_critical_path,
627 begin_main_frame_args_.frame_time); 627 begin_main_frame_args_.frame_time,
628 begin_main_frame_args_.type);
628 state_machine_.WillSendBeginMainFrame(); 629 state_machine_.WillSendBeginMainFrame();
629 // TODO(brianderson): Pass begin_main_frame_args_ directly to client. 630 // TODO(brianderson): Pass begin_main_frame_args_ directly to client.
630 client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_); 631 client_->ScheduledActionSendBeginMainFrame(begin_main_frame_args_);
631 break; 632 break;
632 case SchedulerStateMachine::ACTION_COMMIT: { 633 case SchedulerStateMachine::ACTION_COMMIT: {
633 bool commit_has_no_updates = false; 634 bool commit_has_no_updates = false;
634 state_machine_.WillCommit(commit_has_no_updates); 635 state_machine_.WillCommit(commit_has_no_updates);
635 client_->ScheduledActionCommit(); 636 client_->ScheduledActionCommit();
636 break; 637 break;
637 } 638 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } 800 }
800 801
801 BeginFrameAck Scheduler::CurrentBeginFrameAckForActiveTree() const { 802 BeginFrameAck Scheduler::CurrentBeginFrameAckForActiveTree() const {
802 return BeginFrameAck( 803 return BeginFrameAck(
803 begin_main_frame_args_.source_id, begin_main_frame_args_.sequence_number, 804 begin_main_frame_args_.source_id, begin_main_frame_args_.sequence_number,
804 state_machine_.last_begin_frame_sequence_number_active_tree_was_fresh(), 805 state_machine_.last_begin_frame_sequence_number_active_tree_was_fresh(),
805 0, true); 806 0, true);
806 } 807 }
807 808
808 } // namespace cc 809 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698