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