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

Side by Side Diff: ui/compositor/compositor.cc

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 code review nit Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 settings.main_frame_before_activation_enabled = false; 101 settings.main_frame_before_activation_enabled = false;
102 settings.throttle_frame_production = 102 settings.throttle_frame_production =
103 !command_line->HasSwitch(switches::kDisableGpuVsync); 103 !command_line->HasSwitch(switches::kDisableGpuVsync);
104 #if !defined(OS_MACOSX) 104 #if !defined(OS_MACOSX)
105 settings.partial_swap_enabled = 105 settings.partial_swap_enabled =
106 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 106 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
107 #endif 107 #endif
108 #if defined(OS_CHROMEOS) 108 #if defined(OS_CHROMEOS)
109 settings.per_tile_painting_enabled = true; 109 settings.per_tile_painting_enabled = true;
110 #endif 110 #endif
111 #if defined(OS_WIN)
112 settings.high_latency_mode_on_battery = true;
113 #endif
111 114
112 // These flags should be mirrored by renderer versions in content/renderer/. 115 // These flags should be mirrored by renderer versions in content/renderer/.
113 settings.initial_debug_state.show_debug_borders = 116 settings.initial_debug_state.show_debug_borders =
114 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 117 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
115 settings.initial_debug_state.show_fps_counter = 118 settings.initial_debug_state.show_fps_counter =
116 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 119 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
117 settings.initial_debug_state.show_layer_animation_bounds_rects = 120 settings.initial_debug_state.show_layer_animation_bounds_rects =
118 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); 121 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds);
119 settings.initial_debug_state.show_paint_rects = 122 settings.initial_debug_state.show_paint_rects =
120 command_line->HasSwitch(switches::kUIShowPaintRects); 123 command_line->HasSwitch(switches::kUIShowPaintRects);
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // Call ScheduleDraw() instead of Draw() in order to allow other 446 // Call ScheduleDraw() instead of Draw() in order to allow other
444 // CompositorObservers to be notified before starting another 447 // CompositorObservers to be notified before starting another
445 // draw cycle. 448 // draw cycle.
446 ScheduleDraw(); 449 ScheduleDraw();
447 } 450 }
448 FOR_EACH_OBSERVER( 451 FOR_EACH_OBSERVER(
449 CompositorObserver, observer_list_, OnCompositingEnded(this)); 452 CompositorObserver, observer_list_, OnCompositingEnded(this));
450 } 453 }
451 454
452 } // namespace ui 455 } // namespace ui
OLDNEW
« cc/scheduler/scheduler_unittest.cc ('K') | « cc/trees/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698