| 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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 DCHECK(IsMainThread()); | 111 DCHECK(IsMainThread()); |
| 112 layer_tree_host_->DidCompletePageScaleAnimation(); | 112 layer_tree_host_->DidCompletePageScaleAnimation(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void ProxyMain::BeginMainFrame( | 115 void ProxyMain::BeginMainFrame( |
| 116 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) { | 116 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) { |
| 117 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( | 117 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( |
| 118 benchmark_instrumentation::kDoBeginFrame, | 118 benchmark_instrumentation::kDoBeginFrame, |
| 119 begin_main_frame_state->begin_frame_id); | 119 begin_main_frame_state->begin_frame_id); |
| 120 | 120 |
| 121 begin_main_frame_state->begin_frame_args.source_frame_number = |
| 122 layer_tree_host_->SourceFrameNumber(); |
| 123 |
| 121 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); | 124 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); |
| 122 | 125 |
| 123 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); | 126 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); |
| 124 DCHECK(IsMainThread()); | 127 DCHECK(IsMainThread()); |
| 125 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); | 128 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); |
| 126 | 129 |
| 127 // We need to issue image decode callbacks whether or not we will abort this | 130 // We need to issue image decode callbacks whether or not we will abort this |
| 128 // commit, since the callbacks are only stored in |begin_main_frame_state|. | 131 // commit, since the callbacks are only stored in |begin_main_frame_state|. |
| 129 for (auto& callback : | 132 for (auto& callback : |
| 130 begin_main_frame_state->completed_image_decode_callbacks) { | 133 begin_main_frame_state->completed_image_decode_callbacks) { |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 508 |
| 506 bool ProxyMain::IsImplThread() const { | 509 bool ProxyMain::IsImplThread() const { |
| 507 return task_runner_provider_->IsImplThread(); | 510 return task_runner_provider_->IsImplThread(); |
| 508 } | 511 } |
| 509 | 512 |
| 510 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { | 513 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { |
| 511 return task_runner_provider_->ImplThreadTaskRunner(); | 514 return task_runner_provider_->ImplThreadTaskRunner(); |
| 512 } | 515 } |
| 513 | 516 |
| 514 } // namespace cc | 517 } // namespace cc |
| OLD | NEW |