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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 cc::LayerTreeSettings settings; | 94 cc::LayerTreeSettings settings; |
95 settings.refresh_rate = | 95 settings.refresh_rate = |
96 context_factory_->DoesCreateTestContexts() | 96 context_factory_->DoesCreateTestContexts() |
97 ? kTestRefreshRate | 97 ? kTestRefreshRate |
98 : kDefaultRefreshRate; | 98 : kDefaultRefreshRate; |
99 settings.main_frame_before_draw_enabled = false; | 99 settings.main_frame_before_draw_enabled = false; |
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 settings.partial_swap_enabled = | 104 settings.partial_swap_enabled = |
104 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 105 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
| 106 #endif |
105 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
106 settings.per_tile_painting_enabled = true; | 108 settings.per_tile_painting_enabled = true; |
107 #endif | 109 #endif |
108 | 110 |
109 // These flags should be mirrored by renderer versions in content/renderer/. | 111 // These flags should be mirrored by renderer versions in content/renderer/. |
110 settings.initial_debug_state.show_debug_borders = | 112 settings.initial_debug_state.show_debug_borders = |
111 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 113 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
112 settings.initial_debug_state.show_fps_counter = | 114 settings.initial_debug_state.show_fps_counter = |
113 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 115 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
114 settings.initial_debug_state.show_layer_animation_bounds_rects = | 116 settings.initial_debug_state.show_layer_animation_bounds_rects = |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // CompositorObservers to be notified before starting another | 405 // CompositorObservers to be notified before starting another |
404 // draw cycle. | 406 // draw cycle. |
405 ScheduleDraw(); | 407 ScheduleDraw(); |
406 } | 408 } |
407 FOR_EACH_OBSERVER(CompositorObserver, | 409 FOR_EACH_OBSERVER(CompositorObserver, |
408 observer_list_, | 410 observer_list_, |
409 OnCompositingEnded(this)); | 411 OnCompositingEnded(this)); |
410 } | 412 } |
411 | 413 |
412 } // namespace ui | 414 } // namespace ui |
OLD | NEW |