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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 MainThreadTaskRunner()->PostTask( | 336 MainThreadTaskRunner()->PostTask( |
337 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain, | 337 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain, |
338 impl().remote_channel_weak_ptr)); | 338 impl().remote_channel_weak_ptr)); |
339 } | 339 } |
340 | 340 |
341 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( | 341 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( |
342 const RendererCapabilities& capabilities) {} | 342 const RendererCapabilities& capabilities) {} |
343 | 343 |
344 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} | 344 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} |
345 | 345 |
346 void RemoteChannelImpl::DidCommitAndDrawFrame() {} | 346 void RemoteChannelImpl::DidCommitAndDrawFrame() { |
| 347 DCHECK(task_runner_provider_->IsImplThread()); |
| 348 MainThreadTaskRunner()->PostTask( |
| 349 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCommitAndDrawFrameOnMain, |
| 350 impl().remote_channel_weak_ptr)); |
| 351 } |
| 352 |
| 353 void RemoteChannelImpl::DidCommitAndDrawFrameOnMain() { |
| 354 DCHECK(task_runner_provider_->IsMainThread()); |
| 355 main().layer_tree_host->DidCommitAndDrawFrame(); |
| 356 } |
347 | 357 |
348 void RemoteChannelImpl::SetAnimationEvents( | 358 void RemoteChannelImpl::SetAnimationEvents( |
349 std::unique_ptr<AnimationEvents> queue) {} | 359 std::unique_ptr<AnimationEvents> queue) {} |
350 | 360 |
351 void RemoteChannelImpl::DidLoseOutputSurface() { | 361 void RemoteChannelImpl::DidLoseOutputSurface() { |
352 DCHECK(task_runner_provider_->IsImplThread()); | 362 DCHECK(task_runner_provider_->IsImplThread()); |
353 | 363 |
354 MainThreadTaskRunner()->PostTask( | 364 MainThreadTaskRunner()->PostTask( |
355 FROM_HERE, base::Bind(&RemoteChannelImpl::DidLoseOutputSurfaceOnMain, | 365 FROM_HERE, base::Bind(&RemoteChannelImpl::DidLoseOutputSurfaceOnMain, |
356 impl().remote_channel_weak_ptr)); | 366 impl().remote_channel_weak_ptr)); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 548 |
539 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( | 549 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( |
540 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) | 550 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) |
541 : proxy_impl(nullptr), | 551 : proxy_impl(nullptr), |
542 proxy_impl_weak_factory(nullptr), | 552 proxy_impl_weak_factory(nullptr), |
543 remote_channel_weak_ptr(remote_channel_weak_ptr) {} | 553 remote_channel_weak_ptr(remote_channel_weak_ptr) {} |
544 | 554 |
545 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} | 555 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} |
546 | 556 |
547 } // namespace cc | 557 } // namespace cc |
OLD | NEW |