| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 settings.main_frame_before_activation_enabled = false; | 100 settings.main_frame_before_activation_enabled = false; |
| 101 settings.throttle_frame_production = | 101 settings.throttle_frame_production = |
| 102 !command_line->HasSwitch(switches::kDisableGpuVsync); | 102 !command_line->HasSwitch(switches::kDisableGpuVsync); |
| 103 #if !defined(OS_MACOSX) | 103 #if !defined(OS_MACOSX) |
| 104 settings.partial_swap_enabled = | 104 settings.partial_swap_enabled = |
| 105 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 105 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
| 106 #endif | 106 #endif |
| 107 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
| 108 settings.per_tile_painting_enabled = true; | 108 settings.per_tile_painting_enabled = true; |
| 109 #endif | 109 #endif |
| 110 #if defined(OS_WIN) |
| 111 settings.prioritize_impl_latency_on_battery = true; |
| 112 #endif |
| 110 | 113 |
| 111 // These flags should be mirrored by renderer versions in content/renderer/. | 114 // These flags should be mirrored by renderer versions in content/renderer/. |
| 112 settings.initial_debug_state.show_debug_borders = | 115 settings.initial_debug_state.show_debug_borders = |
| 113 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 116 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
| 114 settings.initial_debug_state.show_fps_counter = | 117 settings.initial_debug_state.show_fps_counter = |
| 115 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 118 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 116 settings.initial_debug_state.show_layer_animation_bounds_rects = | 119 settings.initial_debug_state.show_layer_animation_bounds_rects = |
| 117 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); | 120 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); |
| 118 settings.initial_debug_state.show_paint_rects = | 121 settings.initial_debug_state.show_paint_rects = |
| 119 command_line->HasSwitch(switches::kUIShowPaintRects); | 122 command_line->HasSwitch(switches::kUIShowPaintRects); |
| (...skipping 323 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 |