| OLD | NEW |
| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 args.AsValue()); | 516 args.AsValue()); |
| 517 begin_impl_frame_args_ = args; | 517 begin_impl_frame_args_ = args; |
| 518 BeginImplFrame(); | 518 BeginImplFrame(); |
| 519 FinishImplFrame(); | 519 FinishImplFrame(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void Scheduler::FinishImplFrame() { | 522 void Scheduler::FinishImplFrame() { |
| 523 state_machine_.OnBeginImplFrameIdle(); | 523 state_machine_.OnBeginImplFrameIdle(); |
| 524 ProcessScheduledActions(); | 524 ProcessScheduledActions(); |
| 525 | 525 |
| 526 client_->DidFinishImplFrame(); | 526 client_->DidBeginImplFrameDeadline(); |
| 527 frame_source_->DidFinishFrame(begin_retro_frame_args_.size()); | 527 frame_source_->DidFinishFrame(begin_retro_frame_args_.size()); |
| 528 } | 528 } |
| 529 | 529 |
| 530 // BeginImplFrame starts a compositor frame that will wait up until a deadline | 530 // BeginImplFrame starts a compositor frame that will wait up until a deadline |
| 531 // for a BeginMainFrame+activation to complete before it times out and draws | 531 // for a BeginMainFrame+activation to complete before it times out and draws |
| 532 // any asynchronous animation and scroll/pinch updates. | 532 // any asynchronous animation and scroll/pinch updates. |
| 533 void Scheduler::BeginImplFrame() { | 533 void Scheduler::BeginImplFrame() { |
| 534 DCHECK_EQ(state_machine_.begin_impl_frame_state(), | 534 DCHECK_EQ(state_machine_.begin_impl_frame_state(), |
| 535 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE); | 535 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE); |
| 536 DCHECK(!BeginImplFrameDeadlinePending()); | 536 DCHECK(!BeginImplFrameDeadlinePending()); |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 } | 823 } |
| 824 | 824 |
| 825 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 825 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
| 826 return (state_machine_.commit_state() == | 826 return (state_machine_.commit_state() == |
| 827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
| 828 state_machine_.commit_state() == | 828 state_machine_.commit_state() == |
| 829 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 829 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
| 830 } | 830 } |
| 831 | 831 |
| 832 } // namespace cc | 832 } // namespace cc |
| OLD | NEW |