| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 203 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 204 | 204 |
| 205 cc::LayerTreeSettings settings; | 205 cc::LayerTreeSettings settings; |
| 206 settings.refresh_rate = | 206 settings.refresh_rate = |
| 207 ContextFactory::GetInstance()->DoesCreateTestContexts() | 207 ContextFactory::GetInstance()->DoesCreateTestContexts() |
| 208 ? kTestRefreshRate | 208 ? kTestRefreshRate |
| 209 : kDefaultRefreshRate; | 209 : kDefaultRefreshRate; |
| 210 settings.deadline_scheduling_enabled = | 210 settings.deadline_scheduling_enabled = |
| 211 switches::IsUIDeadlineSchedulingEnabled(); | 211 switches::IsUIDeadlineSchedulingEnabled(); |
| 212 settings.start_commit_before_draw_enabled = |
| 213 cc::switches::IsStartCommitBeforeDrawEnabled(); |
| 214 settings.start_commit_before_activate_enabled = |
| 215 cc::switches::IsStartCommitBeforeActivateEnabled(); |
| 212 settings.partial_swap_enabled = | 216 settings.partial_swap_enabled = |
| 213 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 217 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
| 214 settings.per_tile_painting_enabled = | 218 settings.per_tile_painting_enabled = |
| 215 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); | 219 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); |
| 216 | 220 |
| 217 // These flags should be mirrored by renderer versions in content/renderer/. | 221 // These flags should be mirrored by renderer versions in content/renderer/. |
| 218 settings.initial_debug_state.show_debug_borders = | 222 settings.initial_debug_state.show_debug_borders = |
| 219 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 223 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
| 220 settings.initial_debug_state.show_fps_counter = | 224 settings.initial_debug_state.show_fps_counter = |
| 221 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 225 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 // CompositorObservers to be notified before starting another | 561 // CompositorObservers to be notified before starting another |
| 558 // draw cycle. | 562 // draw cycle. |
| 559 ScheduleDraw(); | 563 ScheduleDraw(); |
| 560 } | 564 } |
| 561 FOR_EACH_OBSERVER(CompositorObserver, | 565 FOR_EACH_OBSERVER(CompositorObserver, |
| 562 observer_list_, | 566 observer_list_, |
| 563 OnCompositingEnded(this)); | 567 OnCompositingEnded(this)); |
| 564 } | 568 } |
| 565 | 569 |
| 566 } // namespace ui | 570 } // namespace ui |
| OLD | NEW |