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