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

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

Issue 222003007: cc: Advance commit state with a CancelableClosure (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedAsValue
Patch Set: use default settings 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
113 void BeginImplFrame(const BeginFrameArgs& args); 113 void BeginImplFrame(const BeginFrameArgs& args);
114 void OnBeginImplFrameDeadline(); 114 void OnBeginImplFrameDeadline();
115 void PollForAnticipatedDrawTriggers(); 115 void PollForAnticipatedDrawTriggers();
116 void PollToAdvanceCommitState();
116 117
117 scoped_ptr<base::Value> StateAsValue() const; 118 scoped_ptr<base::Value> StateAsValue() const;
118 119
119 bool IsInsideAction(SchedulerStateMachine::Action action) { 120 bool IsInsideAction(SchedulerStateMachine::Action action) {
120 return inside_action_ == action; 121 return inside_action_ == action;
121 } 122 }
122 123
123 bool IsBeginMainFrameSent() const; 124 bool IsBeginMainFrameSent() const;
124 void SetContinuousPainting(bool continuous_painting) { 125 void SetContinuousPainting(bool continuous_painting) {
125 state_machine_.SetContinuousPainting(continuous_painting); 126 state_machine_.SetContinuousPainting(continuous_painting);
(...skipping 21 matching lines...) Expand all
147 148
148 const SchedulerSettings settings_; 149 const SchedulerSettings settings_;
149 SchedulerClient* client_; 150 SchedulerClient* client_;
150 int layer_tree_host_id_; 151 int layer_tree_host_id_;
151 scoped_refptr<base::SequencedTaskRunner> impl_task_runner_; 152 scoped_refptr<base::SequencedTaskRunner> impl_task_runner_;
152 153
153 bool last_set_needs_begin_impl_frame_; 154 bool last_set_needs_begin_impl_frame_;
154 BeginFrameArgs last_begin_impl_frame_args_; 155 BeginFrameArgs last_begin_impl_frame_args_;
155 base::CancelableClosure begin_impl_frame_deadline_closure_; 156 base::CancelableClosure begin_impl_frame_deadline_closure_;
156 base::CancelableClosure poll_for_draw_triggers_closure_; 157 base::CancelableClosure poll_for_draw_triggers_closure_;
157 base::RepeatingTimer<Scheduler> advance_commit_state_timer_; 158 base::CancelableClosure advance_commit_state_closure_;
158 159
159 SchedulerStateMachine state_machine_; 160 SchedulerStateMachine state_machine_;
160 bool inside_process_scheduled_actions_; 161 bool inside_process_scheduled_actions_;
161 SchedulerStateMachine::Action inside_action_; 162 SchedulerStateMachine::Action inside_action_;
162 163
163 base::WeakPtrFactory<Scheduler> weak_factory_; 164 base::WeakPtrFactory<Scheduler> weak_factory_;
164 165
165 DISALLOW_COPY_AND_ASSIGN(Scheduler); 166 DISALLOW_COPY_AND_ASSIGN(Scheduler);
166 }; 167 };
167 168
168 } // namespace cc 169 } // namespace cc
169 170
170 #endif // CC_SCHEDULER_SCHEDULER_H_ 171 #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