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 |
| 124 begin_frame_args_for_testing_ = begin_main_frame_state->begin_frame_args; |
| 125 |
121 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); | 126 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); |
122 | 127 |
123 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); | 128 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); |
124 DCHECK(IsMainThread()); | 129 DCHECK(IsMainThread()); |
125 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); | 130 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); |
126 | 131 |
127 // We need to issue image decode callbacks whether or not we will abort this | 132 // 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|. | 133 // commit, since the callbacks are only stored in |begin_main_frame_state|. |
129 for (auto& callback : | 134 for (auto& callback : |
130 begin_main_frame_state->completed_image_decode_callbacks) { | 135 begin_main_frame_state->completed_image_decode_callbacks) { |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 510 |
506 bool ProxyMain::IsImplThread() const { | 511 bool ProxyMain::IsImplThread() const { |
507 return task_runner_provider_->IsImplThread(); | 512 return task_runner_provider_->IsImplThread(); |
508 } | 513 } |
509 | 514 |
510 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { | 515 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { |
511 return task_runner_provider_->ImplThreadTaskRunner(); | 516 return task_runner_provider_->ImplThreadTaskRunner(); |
512 } | 517 } |
513 | 518 |
514 } // namespace cc | 519 } // namespace cc |
OLD | NEW |