| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 settings.initial_debug_state.show_occluding_rects = | 129 settings.initial_debug_state.show_occluding_rects = |
| 130 command_line->HasSwitch(cc::switches::kUIShowOccludingRects); | 130 command_line->HasSwitch(cc::switches::kUIShowOccludingRects); |
| 131 settings.initial_debug_state.show_non_occluding_rects = | 131 settings.initial_debug_state.show_non_occluding_rects = |
| 132 command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects); | 132 command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects); |
| 133 | 133 |
| 134 settings.initial_debug_state.SetRecordRenderingStats( | 134 settings.initial_debug_state.SetRecordRenderingStats( |
| 135 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 135 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
| 136 | 136 |
| 137 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); | 137 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); |
| 138 settings.use_zero_copy = IsUIZeroCopyEnabled(); | 138 settings.use_zero_copy = IsUIZeroCopyEnabled(); |
| 139 settings.single_thread_proxy_scheduler = false; |
| 139 | 140 |
| 140 base::TimeTicks before_create = base::TimeTicks::Now(); | 141 base::TimeTicks before_create = base::TimeTicks::Now(); |
| 141 if (compositor_thread_loop_) { | 142 if (compositor_thread_loop_) { |
| 142 host_ = cc::LayerTreeHost::CreateThreaded( | 143 host_ = cc::LayerTreeHost::CreateThreaded( |
| 143 this, | 144 this, |
| 144 context_factory_->GetSharedBitmapManager(), | 145 context_factory_->GetSharedBitmapManager(), |
| 145 settings, | 146 settings, |
| 146 task_runner_, | 147 task_runner_, |
| 147 compositor_thread_loop_); | 148 compositor_thread_loop_); |
| 148 } else { | 149 } else { |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 // Call ScheduleDraw() instead of Draw() in order to allow other | 440 // Call ScheduleDraw() instead of Draw() in order to allow other |
| 440 // CompositorObservers to be notified before starting another | 441 // CompositorObservers to be notified before starting another |
| 441 // draw cycle. | 442 // draw cycle. |
| 442 ScheduleDraw(); | 443 ScheduleDraw(); |
| 443 } | 444 } |
| 444 FOR_EACH_OBSERVER( | 445 FOR_EACH_OBSERVER( |
| 445 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 446 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
| 446 } | 447 } |
| 447 | 448 |
| 448 } // namespace ui | 449 } // namespace ui |
| OLD | NEW |