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