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

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

Issue 554973002: Disable scheduler deadline task on battery power in Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address brianderson's and mithro's comments Created 6 years, 2 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
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool PendingDrawsShouldBeAborted() const; 231 bool PendingDrawsShouldBeAborted() const;
232 232
233 bool SupportsProactiveBeginFrame() const; 233 bool SupportsProactiveBeginFrame() const;
234 234
235 void SetContinuousPainting(bool continuous_painting) { 235 void SetContinuousPainting(bool continuous_painting) {
236 continuous_painting_ = continuous_painting; 236 continuous_painting_ = continuous_painting;
237 } 237 }
238 238
239 bool CouldSendBeginMainFrame() const; 239 bool CouldSendBeginMainFrame() const;
240 240
241 void SetImplLatencyTakesPriorityOnBattery(
242 bool impl_latency_takes_priority_on_battery) {
243 impl_latency_takes_priority_on_battery_ =
244 impl_latency_takes_priority_on_battery;
245 }
246
241 // TODO(zmo): This is temporary for debugging crbug.com/393331. 247 // TODO(zmo): This is temporary for debugging crbug.com/393331.
242 // We should remove it afterwards. 248 // We should remove it afterwards.
243 std::string GetStatesForDebugging() const; 249 std::string GetStatesForDebugging() const;
244 250
245 protected: 251 protected:
246 bool BeginFrameNeededToAnimateOrDraw() const; 252 bool BeginFrameNeededToAnimateOrDraw() const;
247 bool ProactiveBeginFrameWanted() const; 253 bool ProactiveBeginFrameWanted() const;
248 254
249 // True if we need to force activations to make forward progress. 255 // True if we need to force activations to make forward progress.
250 bool PendingActivationsShouldBeForced() const; 256 bool PendingActivationsShouldBeForced() const;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 bool can_draw_; 313 bool can_draw_;
308 bool has_pending_tree_; 314 bool has_pending_tree_;
309 bool pending_tree_is_ready_for_activation_; 315 bool pending_tree_is_ready_for_activation_;
310 bool active_tree_needs_first_draw_; 316 bool active_tree_needs_first_draw_;
311 bool did_commit_after_animating_; 317 bool did_commit_after_animating_;
312 bool did_create_and_initialize_first_output_surface_; 318 bool did_create_and_initialize_first_output_surface_;
313 bool impl_latency_takes_priority_; 319 bool impl_latency_takes_priority_;
314 bool skip_next_begin_main_frame_to_reduce_latency_; 320 bool skip_next_begin_main_frame_to_reduce_latency_;
315 bool skip_begin_main_frame_to_reduce_latency_; 321 bool skip_begin_main_frame_to_reduce_latency_;
316 bool continuous_painting_; 322 bool continuous_painting_;
323 bool impl_latency_takes_priority_on_battery_;
317 324
318 private: 325 private:
319 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); 326 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);
320 }; 327 };
321 328
322 } // namespace cc 329 } // namespace cc
323 330
324 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 331 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698