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

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

Issue 13613003: cc: Make animations tick regardless of drawing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop extra statemachine function Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine_unittest.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_STATE_MACHINE_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // as a commit is already still in flight. 137 // as a commit is already still in flight.
138 void SetHasPendingTree(bool has_pending_tree); 138 void SetHasPendingTree(bool has_pending_tree);
139 bool has_pending_tree() const { return has_pending_tree_; } 139 bool has_pending_tree() const { return has_pending_tree_; }
140 140
141 void DidLoseOutputSurface(); 141 void DidLoseOutputSurface();
142 void DidRecreateOutputSurface(); 142 void DidRecreateOutputSurface();
143 143
144 // Exposed for testing purposes. 144 // Exposed for testing purposes.
145 void SetMaximumNumberOfFailedDrawsBeforeDrawIsForced(int num_draws); 145 void SetMaximumNumberOfFailedDrawsBeforeDrawIsForced(int num_draws);
146 146
147 // False if drawing is not being prevented, true if drawing won't happen
148 // for some reason, such as not being visible.
149 bool DrawSuspendedUntilCommit() const;
150
147 std::string ToString(); 151 std::string ToString();
148 152
149 protected: 153 protected:
150 bool ShouldDrawForced() const; 154 bool ShouldDrawForced() const;
151 bool DrawSuspendedUntilCommit() const;
152 bool ScheduledToDraw() const; 155 bool ScheduledToDraw() const;
153 bool ShouldDraw() const; 156 bool ShouldDraw() const;
154 bool ShouldAttemptTreeActivation() const; 157 bool ShouldAttemptTreeActivation() const;
155 bool ShouldAcquireLayerTexturesForMainThread() const; 158 bool ShouldAcquireLayerTexturesForMainThread() const;
156 bool ShouldCheckForCompletedTileUploads() const; 159 bool ShouldCheckForCompletedTileUploads() const;
157 bool HasDrawnThisFrame() const; 160 bool HasDrawnThisFrame() const;
158 bool HasAttemptedTreeActivationThisFrame() const; 161 bool HasAttemptedTreeActivationThisFrame() const;
159 bool HasCheckedForCompletedTileUploadsThisFrame() const; 162 bool HasCheckedForCompletedTileUploadsThisFrame() const;
160 163
161 const SchedulerSettings settings_; 164 const SchedulerSettings settings_;
(...skipping 22 matching lines...) Expand all
184 bool draw_if_possible_failed_; 187 bool draw_if_possible_failed_;
185 TextureState texture_state_; 188 TextureState texture_state_;
186 OutputSurfaceState output_surface_state_; 189 OutputSurfaceState output_surface_state_;
187 190
188 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); 191 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);
189 }; 192 };
190 193
191 } // namespace cc 194 } // namespace cc
192 195
193 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 196 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698