| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 // initialized. | 437 // initialized. |
| 438 main().waiting_for_output_surface_initialization = false; | 438 main().waiting_for_output_surface_initialization = false; |
| 439 while (!main().pending_messages.empty()) { | 439 while (!main().pending_messages.empty()) { |
| 440 VLOG(1) << "Handling queued message"; | 440 VLOG(1) << "Handling queued message"; |
| 441 HandleProto(main().pending_messages.front()); | 441 HandleProto(main().pending_messages.front()); |
| 442 main().pending_messages.pop(); | 442 main().pending_messages.pop(); |
| 443 } | 443 } |
| 444 | 444 |
| 445 // The commit after a new output surface can early out, in which case we will | 445 // The commit after a new output surface can early out, in which case we will |
| 446 // never redraw. Schedule one just to be safe. | 446 // never redraw. Schedule one just to be safe. |
| 447 PostSetNeedsRedrawToImpl( | 447 PostSetNeedsRedrawToImpl(gfx::Rect( |
| 448 gfx::Rect(main().layer_tree_host->device_viewport_size())); | 448 main().layer_tree_host->GetLayerTree()->device_viewport_size())); |
| 449 } | 449 } |
| 450 | 450 |
| 451 void RemoteChannelImpl::SendMessageProtoOnMain( | 451 void RemoteChannelImpl::SendMessageProtoOnMain( |
| 452 std::unique_ptr<proto::CompositorMessage> proto) { | 452 std::unique_ptr<proto::CompositorMessage> proto) { |
| 453 DCHECK(task_runner_provider_->IsMainThread()); | 453 DCHECK(task_runner_provider_->IsMainThread()); |
| 454 VLOG(1) << "Sending BeginMainFrame request to the engine."; | 454 VLOG(1) << "Sending BeginMainFrame request to the engine."; |
| 455 | 455 |
| 456 main().remote_proto_channel->SendCompositorProto(*proto); | 456 main().remote_proto_channel->SendCompositorProto(*proto); |
| 457 } | 457 } |
| 458 | 458 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 | 536 |
| 537 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( | 537 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( |
| 538 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) | 538 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) |
| 539 : proxy_impl(nullptr), | 539 : proxy_impl(nullptr), |
| 540 proxy_impl_weak_factory(nullptr), | 540 proxy_impl_weak_factory(nullptr), |
| 541 remote_channel_weak_ptr(remote_channel_weak_ptr) {} | 541 remote_channel_weak_ptr(remote_channel_weak_ptr) {} |
| 542 | 542 |
| 543 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} | 543 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} |
| 544 | 544 |
| 545 } // namespace cc | 545 } // namespace cc |
| OLD | NEW |