| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |