| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 // Queuing the frame counts as "using it", so we need to return true. | 439 // Queuing the frame counts as "using it", so we need to return true. |
| 440 } else { | 440 } else { |
| 441 BeginImplFrame(adjusted_args); | 441 BeginImplFrame(adjusted_args); |
| 442 } | 442 } |
| 443 return true; | 443 return true; |
| 444 } | 444 } |
| 445 | 445 |
| 446 void Scheduler::SetChildrenNeedBeginFrames(bool children_need_begin_frames) { | 446 void Scheduler::SetChildrenNeedBeginFrames(bool children_need_begin_frames) { |
| 447 DCHECK(settings_.forward_begin_frames_to_children); | 447 DCHECK(settings_.forward_begin_frames_to_children); |
| 448 state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames); | 448 state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames); |
| 449 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE); | 449 ProcessScheduledActions(); |
| 450 } | 450 } |
| 451 | 451 |
| 452 // BeginRetroFrame is called for BeginFrames that we've deferred because | 452 // BeginRetroFrame is called for BeginFrames that we've deferred because |
| 453 // the scheduler was in the middle of processing a previous BeginFrame. | 453 // the scheduler was in the middle of processing a previous BeginFrame. |
| 454 void Scheduler::BeginRetroFrame() { | 454 void Scheduler::BeginRetroFrame() { |
| 455 TRACE_EVENT0("cc", "Scheduler::BeginRetroFrame"); | 455 TRACE_EVENT0("cc", "Scheduler::BeginRetroFrame"); |
| 456 DCHECK(!settings_.using_synchronous_renderer_compositor); | 456 DCHECK(!settings_.using_synchronous_renderer_compositor); |
| 457 DCHECK(begin_retro_frame_posted_); | 457 DCHECK(begin_retro_frame_posted_); |
| 458 begin_retro_frame_posted_ = false; | 458 begin_retro_frame_posted_ = false; |
| 459 | 459 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 800 } |
| 801 | 801 |
| 802 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 802 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
| 803 return (state_machine_.commit_state() == | 803 return (state_machine_.commit_state() == |
| 804 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 804 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
| 805 state_machine_.commit_state() == | 805 state_machine_.commit_state() == |
| 806 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 806 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
| 807 } | 807 } |
| 808 | 808 |
| 809 } // namespace cc | 809 } // namespace cc |
| OLD | NEW |