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

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

Issue 222743004: cc: Avoid dynamic calls to base::Bind in scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@pollForCommit3
Patch Set: rebase on bo's patch Created 6 years, 8 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 | « no previous file | cc/scheduler/scheduler.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 #ifndef CC_SCHEDULER_SCHEDULER_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_H_
6 #define CC_SCHEDULER_SCHEDULER_H_ 6 #define CC_SCHEDULER_SCHEDULER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 bool CommitPending() const { return state_machine_.CommitPending(); } 93 bool CommitPending() const { return state_machine_.CommitPending(); }
94 bool RedrawPending() const { return state_machine_.RedrawPending(); } 94 bool RedrawPending() const { return state_machine_.RedrawPending(); }
95 bool ManageTilesPending() const { 95 bool ManageTilesPending() const {
96 return state_machine_.ManageTilesPending(); 96 return state_machine_.ManageTilesPending();
97 } 97 }
98 bool MainThreadIsInHighLatencyMode() const { 98 bool MainThreadIsInHighLatencyMode() const {
99 return state_machine_.MainThreadIsInHighLatencyMode(); 99 return state_machine_.MainThreadIsInHighLatencyMode();
100 } 100 }
101 bool BeginImplFrameDeadlinePending() const { 101 bool BeginImplFrameDeadlinePending() const {
102 return !begin_impl_frame_deadline_closure_.IsCancelled(); 102 return !begin_impl_frame_deadline_task_.IsCancelled();
103 } 103 }
104 104
105 bool WillDrawIfNeeded() const; 105 bool WillDrawIfNeeded() const;
106 106
107 base::TimeTicks AnticipatedDrawTime() const; 107 base::TimeTicks AnticipatedDrawTime() const;
108 108
109 void NotifyBeginMainFrameStarted(); 109 void NotifyBeginMainFrameStarted();
110 110
111 base::TimeTicks LastBeginImplFrameTime(); 111 base::TimeTicks LastBeginImplFrameTime();
112 112
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 bool IsBeginMainFrameSentOrStarted() const; 147 bool IsBeginMainFrameSentOrStarted() const;
148 148
149 const SchedulerSettings settings_; 149 const SchedulerSettings settings_;
150 SchedulerClient* client_; 150 SchedulerClient* client_;
151 int layer_tree_host_id_; 151 int layer_tree_host_id_;
152 scoped_refptr<base::SequencedTaskRunner> impl_task_runner_; 152 scoped_refptr<base::SequencedTaskRunner> impl_task_runner_;
153 153
154 bool last_set_needs_begin_impl_frame_; 154 bool last_set_needs_begin_impl_frame_;
155 BeginFrameArgs last_begin_impl_frame_args_; 155 BeginFrameArgs last_begin_impl_frame_args_;
156 base::CancelableClosure begin_impl_frame_deadline_closure_; 156
157 base::CancelableClosure poll_for_draw_triggers_closure_; 157 base::Closure begin_impl_frame_deadline_closure_;
158 base::CancelableClosure advance_commit_state_closure_; 158 base::Closure poll_for_draw_triggers_closure_;
159 base::Closure advance_commit_state_closure_;
160 base::CancelableClosure begin_impl_frame_deadline_task_;
161 base::CancelableClosure poll_for_draw_triggers_task_;
162 base::CancelableClosure advance_commit_state_task_;
159 163
160 SchedulerStateMachine state_machine_; 164 SchedulerStateMachine state_machine_;
161 bool inside_process_scheduled_actions_; 165 bool inside_process_scheduled_actions_;
162 SchedulerStateMachine::Action inside_action_; 166 SchedulerStateMachine::Action inside_action_;
163 167
164 base::WeakPtrFactory<Scheduler> weak_factory_; 168 base::WeakPtrFactory<Scheduler> weak_factory_;
165 169
166 DISALLOW_COPY_AND_ASSIGN(Scheduler); 170 DISALLOW_COPY_AND_ASSIGN(Scheduler);
167 }; 171 };
168 172
169 } // namespace cc 173 } // namespace cc
170 174
171 #endif // CC_SCHEDULER_SCHEDULER_H_ 175 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698