| 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 // Set frame_source_number in BeginFrameArgs |
| 122 begin_main_frame_state->begin_frame_args.frame_source_number = |
| 123 layer_tree_host_->SourceFrameNumber(); |
| 124 |
| 121 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); | 125 base::TimeTicks begin_main_frame_start_time = base::TimeTicks::Now(); |
| 122 | 126 |
| 123 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); | 127 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame"); |
| 124 DCHECK(IsMainThread()); | 128 DCHECK(IsMainThread()); |
| 125 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); | 129 DCHECK_EQ(NO_PIPELINE_STAGE, current_pipeline_stage_); |
| 126 | 130 |
| 127 // We need to issue image decode callbacks whether or not we will abort this | 131 // 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|. | 132 // commit, since the callbacks are only stored in |begin_main_frame_state|. |
| 129 for (auto& callback : | 133 for (auto& callback : |
| 130 begin_main_frame_state->completed_image_decode_callbacks) { | 134 begin_main_frame_state->completed_image_decode_callbacks) { |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 489 |
| 486 bool ProxyMain::IsImplThread() const { | 490 bool ProxyMain::IsImplThread() const { |
| 487 return task_runner_provider_->IsImplThread(); | 491 return task_runner_provider_->IsImplThread(); |
| 488 } | 492 } |
| 489 | 493 |
| 490 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { | 494 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { |
| 491 return task_runner_provider_->ImplThreadTaskRunner(); | 495 return task_runner_provider_->ImplThreadTaskRunner(); |
| 492 } | 496 } |
| 493 | 497 |
| 494 } // namespace cc | 498 } // namespace cc |
| OLD | NEW |