| 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_impl.h" | 5 #include "cc/trees/proxy_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 | 503 |
| 504 void ProxyImpl::ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) { | 504 void ProxyImpl::ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) { |
| 505 DCHECK(IsImplThread()); | 505 DCHECK(IsImplThread()); |
| 506 unsigned int begin_frame_id = nextBeginFrameId++; | 506 unsigned int begin_frame_id = nextBeginFrameId++; |
| 507 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( | 507 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( |
| 508 benchmark_instrumentation::kSendBeginFrame, begin_frame_id); | 508 benchmark_instrumentation::kSendBeginFrame, begin_frame_id); |
| 509 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state( | 509 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state( |
| 510 new BeginMainFrameAndCommitState); | 510 new BeginMainFrameAndCommitState); |
| 511 begin_main_frame_state->begin_frame_id = begin_frame_id; | 511 begin_main_frame_state->begin_frame_id = begin_frame_id; |
| 512 begin_main_frame_state->begin_frame_args = args; | 512 begin_main_frame_state->begin_frame_args = args; |
| 513 begin_main_frame_state->begin_frame_callbacks = |
| 514 layer_tree_host_impl_->ProcessLayerTreeMutations(); |
| 513 begin_main_frame_state->scroll_info = | 515 begin_main_frame_state->scroll_info = |
| 514 layer_tree_host_impl_->ProcessScrollDeltas(); | 516 layer_tree_host_impl_->ProcessScrollDeltas(); |
| 515 begin_main_frame_state->memory_allocation_limit_bytes = | 517 begin_main_frame_state->memory_allocation_limit_bytes = |
| 516 layer_tree_host_impl_->memory_allocation_limit_bytes(); | 518 layer_tree_host_impl_->memory_allocation_limit_bytes(); |
| 517 begin_main_frame_state->evicted_ui_resources = | 519 begin_main_frame_state->evicted_ui_resources = |
| 518 layer_tree_host_impl_->EvictedUIResourcesExist(); | 520 layer_tree_host_impl_->EvictedUIResourcesExist(); |
| 519 // TODO(vmpstr): This needs to be fixed if | 521 // TODO(vmpstr): This needs to be fixed if |
| 520 // main_frame_before_activation_enabled is set, since we might run this code | 522 // main_frame_before_activation_enabled is set, since we might run this code |
| 521 // twice before recording a duration. crbug.com/469824 | 523 // twice before recording a duration. crbug.com/469824 |
| 522 last_begin_main_frame_args_ = begin_main_frame_state->begin_frame_args; | 524 last_begin_main_frame_args_ = begin_main_frame_state->begin_frame_args; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 bool ProxyImpl::IsMainThreadBlocked() const { | 684 bool ProxyImpl::IsMainThreadBlocked() const { |
| 683 return task_runner_provider_->IsMainThreadBlocked(); | 685 return task_runner_provider_->IsMainThreadBlocked(); |
| 684 } | 686 } |
| 685 | 687 |
| 686 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 688 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 687 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 689 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 688 return main_thread_blocked_commit_vars_unsafe_; | 690 return main_thread_blocked_commit_vars_unsafe_; |
| 689 } | 691 } |
| 690 | 692 |
| 691 } // namespace cc | 693 } // namespace cc |
| OLD | NEW |