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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 // This CapturePostTasks should be destroyed before CommitComplete() is | 239 // This CapturePostTasks should be destroyed before CommitComplete() is |
240 // called since that goes out to the embedder, and we want the embedder | 240 // called since that goes out to the embedder, and we want the embedder |
241 // to receive its callbacks before that. | 241 // to receive its callbacks before that. |
242 BlockingTaskRunner::CapturePostTasks blocked( | 242 BlockingTaskRunner::CapturePostTasks blocked( |
243 task_runner_provider_->blocking_main_thread_task_runner()); | 243 task_runner_provider_->blocking_main_thread_task_runner()); |
244 | 244 |
245 bool hold_commit_for_activation = commit_waits_for_activation_; | 245 bool hold_commit_for_activation = commit_waits_for_activation_; |
246 commit_waits_for_activation_ = false; | 246 commit_waits_for_activation_ = false; |
247 CompletionEvent completion; | 247 CompletionEvent completion; |
248 channel_main_->StartCommitOnImpl(&completion, layer_tree_host_, | 248 channel_main_->NotifyReadyToCommitOnImpl(&completion, layer_tree_host_, |
249 begin_main_frame_start_time, | 249 begin_main_frame_start_time, |
250 hold_commit_for_activation); | 250 hold_commit_for_activation); |
251 completion.Wait(); | 251 completion.Wait(); |
252 } | 252 } |
253 | 253 |
254 current_pipeline_stage_ = NO_PIPELINE_STAGE; | 254 current_pipeline_stage_ = NO_PIPELINE_STAGE; |
255 layer_tree_host_->CommitComplete(); | 255 layer_tree_host_->CommitComplete(); |
256 layer_tree_host_->DidBeginMainFrame(); | 256 layer_tree_host_->DidBeginMainFrame(); |
257 } | 257 } |
258 | 258 |
259 void ProxyMain::FinishAllRendering() { | 259 void ProxyMain::FinishAllRendering() { |
260 DCHECK(IsMainThread()); | 260 DCHECK(IsMainThread()); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 return false; | 455 return false; |
456 channel_main_->SetNeedsCommitOnImpl(); | 456 channel_main_->SetNeedsCommitOnImpl(); |
457 return true; | 457 return true; |
458 } | 458 } |
459 | 459 |
460 bool ProxyMain::IsMainThread() const { | 460 bool ProxyMain::IsMainThread() const { |
461 return task_runner_provider_->IsMainThread(); | 461 return task_runner_provider_->IsMainThread(); |
462 } | 462 } |
463 | 463 |
464 } // namespace cc | 464 } // namespace cc |
OLD | NEW |