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 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); | 121 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); |
125 | 122 |
126 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); | 123 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); |
127 DCHECK(IsMainThread()); | 124 DCHECK(IsMainThread()); |
128 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); | 125 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); |
129 | 126 |
130 // We need to issue image decode callbacks whether or not we will abort this | 127 // We need to issue image decode callbacks whether or not we will abort this |
131 // commit, since the callbacks are only stored in |begin_main_frame_state|. | 128 // commit, since the callbacks are only stored in |begin_main_frame_state|. |
132 for (auto& callback : | 129 for (auto& callback : |
133 begin_main_frame_state->completed_image_decode_callbacks) { | 130 begin_main_frame_state->completed_image_decode_callbacks) { |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 519 |
523 bool ProxyMain::IsImplThread() const { | 520 bool ProxyMain::IsImplThread() const { |
524 return task_runner_provider_->IsImplThread(); | 521 return task_runner_provider_->IsImplThread(); |
525 } | 522 } |
526 | 523 |
527 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { | 524 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { |
528 return task_runner_provider_->ImplThreadTaskRunner(); | 525 return task_runner_provider_->ImplThreadTaskRunner(); |
529 } | 526 } |
530 | 527 |
531 } // namespace cc | 528 } // namespace cc |
OLD | NEW |