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