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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 | 205 |
206 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 206 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
207 | 207 |
208 cc::LayerTreeSettings settings; | 208 cc::LayerTreeSettings settings; |
209 settings.refresh_rate = | 209 settings.refresh_rate = |
210 ContextFactory::GetInstance()->DoesCreateTestContexts() | 210 ContextFactory::GetInstance()->DoesCreateTestContexts() |
211 ? kTestRefreshRate | 211 ? kTestRefreshRate |
212 : kDefaultRefreshRate; | 212 : kDefaultRefreshRate; |
213 settings.main_frame_before_draw_enabled = false; | 213 settings.main_frame_before_draw_enabled = false; |
214 settings.main_frame_before_activation_enabled = false; | 214 settings.main_frame_before_activation_enabled = false; |
215 settings.throttle_frame_production = | |
216 !command_line->HasSwitch(switches::kDisableGpuVsync); | |
brianderson
2014/03/13 21:11:52
This is needed to get aura-based platforms to hono
Sami
2014/03/14 15:34:58
+1 for a separate patch so we can more easily tell
| |
215 settings.partial_swap_enabled = | 217 settings.partial_swap_enabled = |
216 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 218 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
217 #if defined(OS_CHROMEOS) | 219 #if defined(OS_CHROMEOS) |
218 settings.per_tile_painting_enabled = true; | 220 settings.per_tile_painting_enabled = true; |
219 #endif | 221 #endif |
220 | 222 |
221 // These flags should be mirrored by renderer versions in content/renderer/. | 223 // These flags should be mirrored by renderer versions in content/renderer/. |
222 settings.initial_debug_state.show_debug_borders = | 224 settings.initial_debug_state.show_debug_borders = |
223 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 225 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
224 settings.initial_debug_state.show_fps_counter = | 226 settings.initial_debug_state.show_fps_counter = |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
559 // CompositorObservers to be notified before starting another | 561 // CompositorObservers to be notified before starting another |
560 // draw cycle. | 562 // draw cycle. |
561 ScheduleDraw(); | 563 ScheduleDraw(); |
562 } | 564 } |
563 FOR_EACH_OBSERVER(CompositorObserver, | 565 FOR_EACH_OBSERVER(CompositorObserver, |
564 observer_list_, | 566 observer_list_, |
565 OnCompositingEnded(this)); | 567 OnCompositingEnded(this)); |
566 } | 568 } |
567 | 569 |
568 } // namespace ui | 570 } // namespace ui |
OLD | NEW |