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

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: Initialize on_battery_power_ bool 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 SetOnBatteryPower(bool on_battery_power) {
242 on_battery_power_ = on_battery_power;
243 }
244
241 // TODO(zmo): This is temporary for debugging crbug.com/393331. 245 // TODO(zmo): This is temporary for debugging crbug.com/393331.
242 // We should remove it afterwards. 246 // We should remove it afterwards.
243 std::string GetStatesForDebugging() const; 247 std::string GetStatesForDebugging() const;
244 248
245 protected: 249 protected:
246 bool BeginFrameNeededToAnimateOrDraw() const; 250 bool BeginFrameNeededToAnimateOrDraw() const;
247 bool ProactiveBeginFrameWanted() const; 251 bool ProactiveBeginFrameWanted() const;
248 252
249 // True if we need to force activations to make forward progress. 253 // True if we need to force activations to make forward progress.
250 bool PendingActivationsShouldBeForced() const; 254 bool PendingActivationsShouldBeForced() const;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 bool can_draw_; 311 bool can_draw_;
308 bool has_pending_tree_; 312 bool has_pending_tree_;
309 bool pending_tree_is_ready_for_activation_; 313 bool pending_tree_is_ready_for_activation_;
310 bool active_tree_needs_first_draw_; 314 bool active_tree_needs_first_draw_;
311 bool did_commit_after_animating_; 315 bool did_commit_after_animating_;
312 bool did_create_and_initialize_first_output_surface_; 316 bool did_create_and_initialize_first_output_surface_;
313 bool impl_latency_takes_priority_; 317 bool impl_latency_takes_priority_;
314 bool skip_next_begin_main_frame_to_reduce_latency_; 318 bool skip_next_begin_main_frame_to_reduce_latency_;
315 bool skip_begin_main_frame_to_reduce_latency_; 319 bool skip_begin_main_frame_to_reduce_latency_;
316 bool continuous_painting_; 320 bool continuous_painting_;
321 bool on_battery_power_;
317 322
318 private: 323 private:
319 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); 324 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);
320 }; 325 };
321 326
322 } // namespace cc 327 } // namespace cc
323 328
324 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 329 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698