| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/remote_channel_impl.h" | 5 #include "cc/trees/remote_channel_impl.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.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 "cc/animation/animation_events.h" | 10 #include "cc/animation/animation_events.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 MainThreadTaskRunner()->PostTask( | 327 MainThreadTaskRunner()->PostTask( |
| 328 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain, | 328 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain, |
| 329 impl().remote_channel_weak_ptr)); | 329 impl().remote_channel_weak_ptr)); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( | 332 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( |
| 333 const RendererCapabilities& capabilities) {} | 333 const RendererCapabilities& capabilities) {} |
| 334 | 334 |
| 335 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} | 335 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} |
| 336 | 336 |
| 337 void RemoteChannelImpl::DidCommitAndDrawFrame() {} | 337 void RemoteChannelImpl::DidCommitAndDrawFrame() { |
| 338 DCHECK(task_runner_provider_->IsImplThread()); |
| 339 MainThreadTaskRunner()->PostTask( |
| 340 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCommitAndDrawFrameOnMain, |
| 341 impl().remote_channel_weak_ptr)); |
| 342 } |
| 338 | 343 |
| 339 void RemoteChannelImpl::SetAnimationEvents( | 344 void RemoteChannelImpl::SetAnimationEvents( |
| 340 std::unique_ptr<AnimationEvents> queue) {} | 345 std::unique_ptr<AnimationEvents> queue) {} |
| 341 | 346 |
| 342 void RemoteChannelImpl::DidLoseOutputSurface() { | 347 void RemoteChannelImpl::DidLoseOutputSurface() { |
| 343 DCHECK(task_runner_provider_->IsImplThread()); | 348 DCHECK(task_runner_provider_->IsImplThread()); |
| 344 | 349 |
| 345 MainThreadTaskRunner()->PostTask( | 350 MainThreadTaskRunner()->PostTask( |
| 346 FROM_HERE, base::Bind(&RemoteChannelImpl::DidLoseOutputSurfaceOnMain, | 351 FROM_HERE, base::Bind(&RemoteChannelImpl::DidLoseOutputSurfaceOnMain, |
| 347 impl().remote_channel_weak_ptr)); | 352 impl().remote_channel_weak_ptr)); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 FROM_HERE, | 397 FROM_HERE, |
| 393 base::Bind(&RemoteChannelImpl::SendMessageProtoOnMain, | 398 base::Bind(&RemoteChannelImpl::SendMessageProtoOnMain, |
| 394 impl().remote_channel_weak_ptr, base::Passed(&proto))); | 399 impl().remote_channel_weak_ptr, base::Passed(&proto))); |
| 395 } | 400 } |
| 396 | 401 |
| 397 void RemoteChannelImpl::DidCompleteSwapBuffersOnMain() { | 402 void RemoteChannelImpl::DidCompleteSwapBuffersOnMain() { |
| 398 DCHECK(task_runner_provider_->IsMainThread()); | 403 DCHECK(task_runner_provider_->IsMainThread()); |
| 399 main().layer_tree_host->DidCompleteSwapBuffers(); | 404 main().layer_tree_host->DidCompleteSwapBuffers(); |
| 400 } | 405 } |
| 401 | 406 |
| 407 void RemoteChannelImpl::DidCommitAndDrawFrameOnMain() { |
| 408 DCHECK(task_runner_provider_->IsMainThread()); |
| 409 main().layer_tree_host->DidCommitAndDrawFrame(); |
| 410 } |
| 411 |
| 402 void RemoteChannelImpl::DidLoseOutputSurfaceOnMain() { | 412 void RemoteChannelImpl::DidLoseOutputSurfaceOnMain() { |
| 403 DCHECK(task_runner_provider_->IsMainThread()); | 413 DCHECK(task_runner_provider_->IsMainThread()); |
| 404 | 414 |
| 405 main().layer_tree_host->DidLoseOutputSurface(); | 415 main().layer_tree_host->DidLoseOutputSurface(); |
| 406 } | 416 } |
| 407 | 417 |
| 408 void RemoteChannelImpl::RequestNewOutputSurfaceOnMain() { | 418 void RemoteChannelImpl::RequestNewOutputSurfaceOnMain() { |
| 409 DCHECK(task_runner_provider_->IsMainThread()); | 419 DCHECK(task_runner_provider_->IsMainThread()); |
| 410 | 420 |
| 411 main().layer_tree_host->RequestNewOutputSurface(); | 421 main().layer_tree_host->RequestNewOutputSurface(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 539 |
| 530 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( | 540 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( |
| 531 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) | 541 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) |
| 532 : proxy_impl(nullptr), | 542 : proxy_impl(nullptr), |
| 533 proxy_impl_weak_factory(nullptr), | 543 proxy_impl_weak_factory(nullptr), |
| 534 remote_channel_weak_ptr(remote_channel_weak_ptr) {} | 544 remote_channel_weak_ptr(remote_channel_weak_ptr) {} |
| 535 | 545 |
| 536 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} | 546 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} |
| 537 | 547 |
| 538 } // namespace cc | 548 } // namespace cc |
| OLD | NEW |