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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); | 147 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); |
148 settings.initial_debug_state.show_occluding_rects = | 148 settings.initial_debug_state.show_occluding_rects = |
149 command_line->HasSwitch(cc::switches::kUIShowOccludingRects); | 149 command_line->HasSwitch(cc::switches::kUIShowOccludingRects); |
150 settings.initial_debug_state.show_non_occluding_rects = | 150 settings.initial_debug_state.show_non_occluding_rects = |
151 command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects); | 151 command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects); |
152 | 152 |
153 settings.initial_debug_state.SetRecordRenderingStats( | 153 settings.initial_debug_state.SetRecordRenderingStats( |
154 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 154 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
155 | 155 |
156 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); | 156 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); |
157 settings.use_map_image = IsUIMapImageEnabled(); | 157 settings.use_zero_copy = IsUIZeroCopyEnabled(); |
158 | 158 |
159 base::TimeTicks before_create = base::TimeTicks::Now(); | 159 base::TimeTicks before_create = base::TimeTicks::Now(); |
160 if (!!g_compositor_thread) { | 160 if (!!g_compositor_thread) { |
161 host_ = cc::LayerTreeHost::CreateThreaded( | 161 host_ = cc::LayerTreeHost::CreateThreaded( |
162 this, | 162 this, |
163 g_shared_bitmap_manager, | 163 g_shared_bitmap_manager, |
164 settings, | 164 settings, |
165 g_compositor_thread->message_loop_proxy()); | 165 g_compositor_thread->message_loop_proxy()); |
166 } else { | 166 } else { |
167 host_ = cc::LayerTreeHost::CreateSingleThreaded( | 167 host_ = cc::LayerTreeHost::CreateSingleThreaded( |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 // CompositorObservers to be notified before starting another | 472 // CompositorObservers to be notified before starting another |
473 // draw cycle. | 473 // draw cycle. |
474 ScheduleDraw(); | 474 ScheduleDraw(); |
475 } | 475 } |
476 FOR_EACH_OBSERVER(CompositorObserver, | 476 FOR_EACH_OBSERVER(CompositorObserver, |
477 observer_list_, | 477 observer_list_, |
478 OnCompositingEnded(this)); | 478 OnCompositingEnded(this)); |
479 } | 479 } |
480 | 480 |
481 } // namespace ui | 481 } // namespace ui |
OLD | NEW |