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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
331 MainThreadTaskRunner()->PostTask( | 331 MainThreadTaskRunner()->PostTask( |
332 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain, | 332 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain, |
333 impl().remote_channel_weak_ptr)); | 333 impl().remote_channel_weak_ptr)); |
334 } | 334 } |
335 | 335 |
336 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( | 336 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( |
337 const RendererCapabilities& capabilities) {} | 337 const RendererCapabilities& capabilities) {} |
338 | 338 |
339 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} | 339 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} |
340 | 340 |
341 void RemoteChannelImpl::DidCommitAndDrawFrame() {} | 341 void RemoteChannelImpl::DidCommitAndDrawFrame() { |
342 DCHECK(task_runner_provider_->IsImplThread()); | |
343 MainThreadTaskRunner()->PostTask( | |
344 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCommitAndDrawFrameOnMain, | |
345 impl().remote_channel_weak_ptr)); | |
346 } | |
342 | 347 |
343 void RemoteChannelImpl::SetAnimationEvents( | 348 void RemoteChannelImpl::SetAnimationEvents( |
344 std::unique_ptr<AnimationEvents> queue) {} | 349 std::unique_ptr<AnimationEvents> queue) {} |
345 | 350 |
346 void RemoteChannelImpl::DidLoseOutputSurface() { | 351 void RemoteChannelImpl::DidLoseOutputSurface() { |
347 DCHECK(task_runner_provider_->IsImplThread()); | 352 DCHECK(task_runner_provider_->IsImplThread()); |
348 | 353 |
349 MainThreadTaskRunner()->PostTask( | 354 MainThreadTaskRunner()->PostTask( |
350 FROM_HERE, base::Bind(&RemoteChannelImpl::DidLoseOutputSurfaceOnMain, | 355 FROM_HERE, base::Bind(&RemoteChannelImpl::DidLoseOutputSurfaceOnMain, |
351 impl().remote_channel_weak_ptr)); | 356 impl().remote_channel_weak_ptr)); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 FROM_HERE, | 401 FROM_HERE, |
397 base::Bind(&RemoteChannelImpl::SendMessageProtoOnMain, | 402 base::Bind(&RemoteChannelImpl::SendMessageProtoOnMain, |
398 impl().remote_channel_weak_ptr, base::Passed(&proto))); | 403 impl().remote_channel_weak_ptr, base::Passed(&proto))); |
399 } | 404 } |
400 | 405 |
401 void RemoteChannelImpl::DidCompleteSwapBuffersOnMain() { | 406 void RemoteChannelImpl::DidCompleteSwapBuffersOnMain() { |
402 DCHECK(task_runner_provider_->IsMainThread()); | 407 DCHECK(task_runner_provider_->IsMainThread()); |
403 main().layer_tree_host->DidCompleteSwapBuffers(); | 408 main().layer_tree_host->DidCompleteSwapBuffers(); |
404 } | 409 } |
405 | 410 |
411 void RemoteChannelImpl::DidCommitAndDrawFrameOnMain() { | |
Khushal
2016/05/18 00:23:01
Just a reminder, make sure to update the remote ch
shaktisahu
2016/05/19 21:39:19
Done.
| |
412 DCHECK(task_runner_provider_->IsMainThread()); | |
413 main().layer_tree_host->DidCommitAndDrawFrame(); | |
414 } | |
415 | |
406 void RemoteChannelImpl::DidLoseOutputSurfaceOnMain() { | 416 void RemoteChannelImpl::DidLoseOutputSurfaceOnMain() { |
407 DCHECK(task_runner_provider_->IsMainThread()); | 417 DCHECK(task_runner_provider_->IsMainThread()); |
408 | 418 |
409 main().layer_tree_host->DidLoseOutputSurface(); | 419 main().layer_tree_host->DidLoseOutputSurface(); |
410 } | 420 } |
411 | 421 |
412 void RemoteChannelImpl::RequestNewOutputSurfaceOnMain() { | 422 void RemoteChannelImpl::RequestNewOutputSurfaceOnMain() { |
413 DCHECK(task_runner_provider_->IsMainThread()); | 423 DCHECK(task_runner_provider_->IsMainThread()); |
414 | 424 |
415 main().layer_tree_host->RequestNewOutputSurface(); | 425 main().layer_tree_host->RequestNewOutputSurface(); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 | 543 |
534 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( | 544 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( |
535 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) | 545 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) |
536 : proxy_impl(nullptr), | 546 : proxy_impl(nullptr), |
537 proxy_impl_weak_factory(nullptr), | 547 proxy_impl_weak_factory(nullptr), |
538 remote_channel_weak_ptr(remote_channel_weak_ptr) {} | 548 remote_channel_weak_ptr(remote_channel_weak_ptr) {} |
539 | 549 |
540 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} | 550 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} |
541 | 551 |
542 } // namespace cc | 552 } // namespace cc |
OLD | NEW |