| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cc/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 base::Bind(&ProxyMain::BeginMainFrame, impl().proxy_main_weak_ptr, | 271 base::Bind(&ProxyMain::BeginMainFrame, impl().proxy_main_weak_ptr, |
| 272 base::Passed(&begin_main_frame_state))); | 272 base::Passed(&begin_main_frame_state))); |
| 273 } | 273 } |
| 274 | 274 |
| 275 std::unique_ptr<ProxyImpl> ThreadedChannel::CreateProxyImpl( | 275 std::unique_ptr<ProxyImpl> ThreadedChannel::CreateProxyImpl( |
| 276 ChannelImpl* channel_impl, | 276 ChannelImpl* channel_impl, |
| 277 LayerTreeHost* layer_tree_host, | 277 LayerTreeHost* layer_tree_host, |
| 278 TaskRunnerProvider* task_runner_provider, | 278 TaskRunnerProvider* task_runner_provider, |
| 279 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { | 279 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { |
| 280 DCHECK(IsImplThread()); | 280 DCHECK(IsImplThread()); |
| 281 return ProxyImpl::Create(channel_impl, layer_tree_host, task_runner_provider, | 281 return base::MakeUnique<ProxyImpl>(channel_impl, layer_tree_host, |
| 282 std::move(external_begin_frame_source)); | 282 task_runner_provider, |
| 283 std::move(external_begin_frame_source)); |
| 283 } | 284 } |
| 284 | 285 |
| 285 void ThreadedChannel::InitializeImplOnImpl( | 286 void ThreadedChannel::InitializeImplOnImpl( |
| 286 CompletionEvent* completion, | 287 CompletionEvent* completion, |
| 287 LayerTreeHost* layer_tree_host, | 288 LayerTreeHost* layer_tree_host, |
| 288 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { | 289 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { |
| 289 DCHECK(IsImplThread()); | 290 DCHECK(IsImplThread()); |
| 290 impl().proxy_impl = | 291 impl().proxy_impl = |
| 291 CreateProxyImpl(this, layer_tree_host, task_runner_provider_, | 292 CreateProxyImpl(this, layer_tree_host, task_runner_provider_, |
| 292 std::move(external_begin_frame_source)); | 293 std::move(external_begin_frame_source)); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 353 |
| 353 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} | 354 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} |
| 354 | 355 |
| 355 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( | 356 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( |
| 356 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) | 357 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) |
| 357 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} | 358 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} |
| 358 | 359 |
| 359 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} | 360 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} |
| 360 | 361 |
| 361 } // namespace cc | 362 } // namespace cc |
| OLD | NEW |