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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 TRACE_EVENT_INSTANT0("cc", "EarlyOut_OutputSurfaceLost", | 177 TRACE_EVENT_INSTANT0("cc", "EarlyOut_OutputSurfaceLost", |
178 TRACE_EVENT_SCOPE_THREAD); | 178 TRACE_EVENT_SCOPE_THREAD); |
179 channel_main_->BeginMainFrameAbortedOnImpl( | 179 channel_main_->BeginMainFrameAbortedOnImpl( |
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 if (begin_main_frame_state->begin_frame_callbacks) { |
| 188 for (auto& callback : *begin_main_frame_state->begin_frame_callbacks) |
| 189 callback.Run(); |
| 190 } |
| 191 |
187 layer_tree_host_->ApplyScrollAndScale( | 192 layer_tree_host_->ApplyScrollAndScale( |
188 begin_main_frame_state->scroll_info.get()); | 193 begin_main_frame_state->scroll_info.get()); |
189 | 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 |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 return false; | 471 return false; |
467 channel_main_->SetNeedsCommitOnImpl(); | 472 channel_main_->SetNeedsCommitOnImpl(); |
468 return true; | 473 return true; |
469 } | 474 } |
470 | 475 |
471 bool ProxyMain::IsMainThread() const { | 476 bool ProxyMain::IsMainThread() const { |
472 return task_runner_provider_->IsMainThread(); | 477 return task_runner_provider_->IsMainThread(); |
473 } | 478 } |
474 | 479 |
475 } // namespace cc | 480 } // namespace cc |
OLD | NEW |