| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/proxy_main.h" | 5 #include "cc/trees/proxy_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 TRACE_EVENT0("cc", "ProxyMain::~ProxyMain"); | 65 TRACE_EVENT0("cc", "ProxyMain::~ProxyMain"); |
| 66 DCHECK(IsMainThread()); | 66 DCHECK(IsMainThread()); |
| 67 DCHECK(!started_); | 67 DCHECK(!started_); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void ProxyMain::SetChannel(std::unique_ptr<ChannelMain> channel_main) { | 70 void ProxyMain::SetChannel(std::unique_ptr<ChannelMain> channel_main) { |
| 71 DCHECK(!channel_main_); | 71 DCHECK(!channel_main_); |
| 72 channel_main_ = std::move(channel_main); | 72 channel_main_ = std::move(channel_main); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void ProxyMain::DidCompleteSwapBuffers() { | 75 void ProxyMain::DidReceiveCompositorFrameAck() { |
| 76 DCHECK(IsMainThread()); | 76 DCHECK(IsMainThread()); |
| 77 layer_tree_host_->DidCompleteSwapBuffers(); | 77 layer_tree_host_->DidReceiveCompositorFrameAck(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void ProxyMain::BeginMainFrameNotExpectedSoon() { | 80 void ProxyMain::BeginMainFrameNotExpectedSoon() { |
| 81 TRACE_EVENT0("cc", "ProxyMain::BeginMainFrameNotExpectedSoon"); | 81 TRACE_EVENT0("cc", "ProxyMain::BeginMainFrameNotExpectedSoon"); |
| 82 DCHECK(IsMainThread()); | 82 DCHECK(IsMainThread()); |
| 83 layer_tree_host_->BeginMainFrameNotExpectedSoon(); | 83 layer_tree_host_->BeginMainFrameNotExpectedSoon(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void ProxyMain::DidCommitAndDrawFrame() { | 86 void ProxyMain::DidCommitAndDrawFrame() { |
| 87 DCHECK(IsMainThread()); | 87 DCHECK(IsMainThread()); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 return false; | 419 return false; |
| 420 channel_main_->SetNeedsCommitOnImpl(); | 420 channel_main_->SetNeedsCommitOnImpl(); |
| 421 return true; | 421 return true; |
| 422 } | 422 } |
| 423 | 423 |
| 424 bool ProxyMain::IsMainThread() const { | 424 bool ProxyMain::IsMainThread() const { |
| 425 return task_runner_provider_->IsMainThread(); | 425 return task_runner_provider_->IsMainThread(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 } // namespace cc | 428 } // namespace cc |
| OLD | NEW |