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

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

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: address nits, rename to DidNotProduceFrame. Created 3 years, 7 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
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 455 }
456 456
457 bool did_submit = false; 457 bool did_submit = false;
458 if (result == kBeginFrameFinished) { 458 if (result == kBeginFrameFinished) {
459 did_submit = state_machine_.did_submit_in_last_frame(); 459 did_submit = state_machine_.did_submit_in_last_frame();
460 } 460 }
461 461
462 BeginFrameAck ack(args.source_id, args.sequence_number, 462 BeginFrameAck ack(args.source_id, args.sequence_number,
463 latest_confirmed_sequence_number, did_submit); 463 latest_confirmed_sequence_number, did_submit);
464 begin_frame_source_->DidFinishFrame(this, ack); 464 begin_frame_source_->DidFinishFrame(this, ack);
465 if (!did_submit)
466 client_->DidNotProduceFrame(ack);
465 } 467 }
466 468
467 // BeginImplFrame starts a compositor frame that will wait up until a deadline 469 // BeginImplFrame starts a compositor frame that will wait up until a deadline
468 // for a BeginMainFrame+activation to complete before it times out and draws 470 // for a BeginMainFrame+activation to complete before it times out and draws
469 // any asynchronous animation and scroll/pinch updates. 471 // any asynchronous animation and scroll/pinch updates.
470 void Scheduler::BeginImplFrame(const BeginFrameArgs& args, 472 void Scheduler::BeginImplFrame(const BeginFrameArgs& args,
471 base::TimeTicks now) { 473 base::TimeTicks now) {
472 DCHECK_EQ(state_machine_.begin_impl_frame_state(), 474 DCHECK_EQ(state_machine_.begin_impl_frame_state(),
473 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE); 475 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE);
474 DCHECK(begin_impl_frame_deadline_task_.IsCancelled()); 476 DCHECK(begin_impl_frame_deadline_task_.IsCancelled());
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 } 836 }
835 837
836 BeginFrameAck Scheduler::CurrentBeginFrameAckForActiveTree() const { 838 BeginFrameAck Scheduler::CurrentBeginFrameAckForActiveTree() const {
837 return BeginFrameAck( 839 return BeginFrameAck(
838 begin_main_frame_args_.source_id, begin_main_frame_args_.sequence_number, 840 begin_main_frame_args_.source_id, begin_main_frame_args_.sequence_number,
839 state_machine_.last_begin_frame_sequence_number_active_tree_was_fresh(), 841 state_machine_.last_begin_frame_sequence_number_active_tree_was_fresh(),
840 true); 842 true);
841 } 843 }
842 844
843 } // namespace cc 845 } // namespace cc
OLDNEW
« 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