| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST, | 180 CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST, |
| 181 begin_main_frame_start_time); | 181 begin_main_frame_start_time); |
| 182 return; | 182 return; |
| 183 } | 183 } |
| 184 | 184 |
| 185 current_pipeline_stage_ = ANIMATE_PIPELINE_STAGE; | 185 current_pipeline_stage_ = ANIMATE_PIPELINE_STAGE; |
| 186 | 186 |
| 187 layer_tree_host_->ApplyScrollAndScale( | 187 layer_tree_host_->ApplyScrollAndScale( |
| 188 begin_main_frame_state->scroll_info.get()); | 188 begin_main_frame_state->scroll_info.get()); |
| 189 | 189 |
| 190 if (begin_main_frame_state->begin_frame_callbacks) { |
| 191 for (auto& callback : *begin_main_frame_state->begin_frame_callbacks) |
| 192 callback.Run(); |
| 193 } |
| 194 |
| 190 layer_tree_host_->WillBeginMainFrame(); | 195 layer_tree_host_->WillBeginMainFrame(); |
| 191 | 196 |
| 192 layer_tree_host_->BeginMainFrame(begin_main_frame_state->begin_frame_args); | 197 layer_tree_host_->BeginMainFrame(begin_main_frame_state->begin_frame_args); |
| 193 layer_tree_host_->AnimateLayers( | 198 layer_tree_host_->AnimateLayers( |
| 194 begin_main_frame_state->begin_frame_args.frame_time); | 199 begin_main_frame_state->begin_frame_args.frame_time); |
| 195 | 200 |
| 196 // Recreate all UI resources if there were evicted UI resources when the impl | 201 // Recreate all UI resources if there were evicted UI resources when the impl |
| 197 // thread initiated the commit. | 202 // thread initiated the commit. |
| 198 if (begin_main_frame_state->evicted_ui_resources) | 203 if (begin_main_frame_state->evicted_ui_resources) |
| 199 layer_tree_host_->RecreateUIResources(); | 204 layer_tree_host_->RecreateUIResources(); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 return false; | 469 return false; |
| 465 channel_main_->SetNeedsCommitOnImpl(); | 470 channel_main_->SetNeedsCommitOnImpl(); |
| 466 return true; | 471 return true; |
| 467 } | 472 } |
| 468 | 473 |
| 469 bool ProxyMain::IsMainThread() const { | 474 bool ProxyMain::IsMainThread() const { |
| 470 return task_runner_provider_->IsMainThread(); | 475 return task_runner_provider_->IsMainThread(); |
| 471 } | 476 } |
| 472 | 477 |
| 473 } // namespace cc | 478 } // namespace cc |
| OLD | NEW |