| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 settings.main_frame_before_activation_enabled = false; | 120 settings.main_frame_before_activation_enabled = false; |
| 121 settings.throttle_frame_production = | 121 settings.throttle_frame_production = |
| 122 !command_line->HasSwitch(switches::kDisableGpuVsync); | 122 !command_line->HasSwitch(switches::kDisableGpuVsync); |
| 123 #if !defined(OS_MACOSX) | 123 #if !defined(OS_MACOSX) |
| 124 settings.partial_swap_enabled = | 124 settings.partial_swap_enabled = |
| 125 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 125 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
| 126 #endif | 126 #endif |
| 127 #if defined(OS_CHROMEOS) | 127 #if defined(OS_CHROMEOS) |
| 128 settings.per_tile_painting_enabled = true; | 128 settings.per_tile_painting_enabled = true; |
| 129 #endif | 129 #endif |
| 130 #if defined(OS_WIN) |
| 131 settings.prioritize_impl_latency_on_battery = true; |
| 132 #endif |
| 130 | 133 |
| 131 // These flags should be mirrored by renderer versions in content/renderer/. | 134 // These flags should be mirrored by renderer versions in content/renderer/. |
| 132 settings.initial_debug_state.show_debug_borders = | 135 settings.initial_debug_state.show_debug_borders = |
| 133 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 136 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
| 134 settings.initial_debug_state.show_fps_counter = | 137 settings.initial_debug_state.show_fps_counter = |
| 135 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 138 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 136 settings.initial_debug_state.show_layer_animation_bounds_rects = | 139 settings.initial_debug_state.show_layer_animation_bounds_rects = |
| 137 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); | 140 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); |
| 138 settings.initial_debug_state.show_paint_rects = | 141 settings.initial_debug_state.show_paint_rects = |
| 139 command_line->HasSwitch(switches::kUIShowPaintRects); | 142 command_line->HasSwitch(switches::kUIShowPaintRects); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 // Call ScheduleDraw() instead of Draw() in order to allow other | 478 // Call ScheduleDraw() instead of Draw() in order to allow other |
| 476 // CompositorObservers to be notified before starting another | 479 // CompositorObservers to be notified before starting another |
| 477 // draw cycle. | 480 // draw cycle. |
| 478 ScheduleDraw(); | 481 ScheduleDraw(); |
| 479 } | 482 } |
| 480 FOR_EACH_OBSERVER( | 483 FOR_EACH_OBSERVER( |
| 481 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 484 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
| 482 } | 485 } |
| 483 | 486 |
| 484 } // namespace ui | 487 } // namespace ui |
| OLD | NEW |