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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 256 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
257 | 257 |
258 cc::LayerTreeSettings settings; | 258 cc::LayerTreeSettings settings; |
259 settings.refresh_rate = | 259 settings.refresh_rate = |
260 ContextFactory::GetInstance()->DoesCreateTestContexts() | 260 ContextFactory::GetInstance()->DoesCreateTestContexts() |
261 ? kTestRefreshRate | 261 ? kTestRefreshRate |
262 : kDefaultRefreshRate; | 262 : kDefaultRefreshRate; |
263 settings.deadline_scheduling_enabled = | 263 settings.deadline_scheduling_enabled = |
264 switches::IsUIDeadlineSchedulingEnabled(); | 264 switches::IsUIDeadlineSchedulingEnabled(); |
| 265 settings.start_commit_before_draw_enabled = |
| 266 cc::switches::IsStartCommitBeforeDrawEnabled(); |
| 267 settings.start_commit_before_activate_enabled = |
| 268 cc::switches::IsStartCommitBeforeActivateEnabled(); |
265 settings.partial_swap_enabled = | 269 settings.partial_swap_enabled = |
266 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 270 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
267 settings.per_tile_painting_enabled = | 271 settings.per_tile_painting_enabled = |
268 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); | 272 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); |
269 | 273 |
270 // These flags should be mirrored by renderer versions in content/renderer/. | 274 // These flags should be mirrored by renderer versions in content/renderer/. |
271 settings.initial_debug_state.show_debug_borders = | 275 settings.initial_debug_state.show_debug_borders = |
272 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 276 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
273 settings.initial_debug_state.show_fps_counter = | 277 settings.initial_debug_state.show_fps_counter = |
274 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 278 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 // CompositorObservers to be notified before starting another | 629 // CompositorObservers to be notified before starting another |
626 // draw cycle. | 630 // draw cycle. |
627 ScheduleDraw(); | 631 ScheduleDraw(); |
628 } | 632 } |
629 FOR_EACH_OBSERVER(CompositorObserver, | 633 FOR_EACH_OBSERVER(CompositorObserver, |
630 observer_list_, | 634 observer_list_, |
631 OnCompositingEnded(this)); | 635 OnCompositingEnded(this)); |
632 } | 636 } |
633 | 637 |
634 } // namespace ui | 638 } // namespace ui |
OLD | NEW |