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 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/debug/trace_event_argument.h" | 10 #include "base/debug/trace_event_argument.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 return scheduler->background_frame_source_internal_.get(); | 68 return scheduler->background_frame_source_internal_.get(); |
69 } | 69 } |
70 | 70 |
71 Scheduler::Scheduler( | 71 Scheduler::Scheduler( |
72 SchedulerClient* client, | 72 SchedulerClient* client, |
73 const SchedulerSettings& scheduler_settings, | 73 const SchedulerSettings& scheduler_settings, |
74 int layer_tree_host_id, | 74 int layer_tree_host_id, |
75 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 75 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
76 SchedulerFrameSourcesConstructor* frame_sources_constructor) | 76 SchedulerFrameSourcesConstructor* frame_sources_constructor) |
77 : frame_source_(), | 77 : frame_source_(), |
78 primary_frame_source_(NULL), | 78 primary_frame_source_(nullptr), |
79 background_frame_source_(NULL), | 79 background_frame_source_(nullptr), |
80 primary_frame_source_internal_(), | 80 primary_frame_source_internal_(), |
81 background_frame_source_internal_(), | 81 background_frame_source_internal_(), |
82 vsync_observer_(NULL), | 82 vsync_observer_(nullptr), |
83 settings_(scheduler_settings), | 83 settings_(scheduler_settings), |
84 client_(client), | 84 client_(client), |
85 layer_tree_host_id_(layer_tree_host_id), | 85 layer_tree_host_id_(layer_tree_host_id), |
86 task_runner_(task_runner), | 86 task_runner_(task_runner), |
87 begin_retro_frame_posted_(false), | 87 begin_retro_frame_posted_(false), |
88 state_machine_(scheduler_settings), | 88 state_machine_(scheduler_settings), |
89 inside_process_scheduled_actions_(false), | 89 inside_process_scheduled_actions_(false), |
90 inside_action_(SchedulerStateMachine::ACTION_NONE), | 90 inside_action_(SchedulerStateMachine::ACTION_NONE), |
91 weak_factory_(this) { | 91 weak_factory_(this) { |
92 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), | 92 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 } | 746 } |
747 | 747 |
748 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 748 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
749 return (state_machine_.commit_state() == | 749 return (state_machine_.commit_state() == |
750 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 750 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
751 state_machine_.commit_state() == | 751 state_machine_.commit_state() == |
752 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 752 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
753 } | 753 } |
754 | 754 |
755 } // namespace cc | 755 } // namespace cc |
OLD | NEW |