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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 486 |
487 void ProxyImpl::ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) { | 487 void ProxyImpl::ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) { |
488 DCHECK(IsImplThread()); | 488 DCHECK(IsImplThread()); |
489 unsigned int begin_frame_id = nextBeginFrameId++; | 489 unsigned int begin_frame_id = nextBeginFrameId++; |
490 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( | 490 benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task( |
491 benchmark_instrumentation::kSendBeginFrame, begin_frame_id); | 491 benchmark_instrumentation::kSendBeginFrame, begin_frame_id); |
492 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state( | 492 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state( |
493 new BeginMainFrameAndCommitState); | 493 new BeginMainFrameAndCommitState); |
494 begin_main_frame_state->begin_frame_id = begin_frame_id; | 494 begin_main_frame_state->begin_frame_id = begin_frame_id; |
495 begin_main_frame_state->begin_frame_args = args; | 495 begin_main_frame_state->begin_frame_args = args; |
| 496 begin_main_frame_state->begin_frame_callbacks = |
| 497 layer_tree_host_impl_->ProcessLayerTreeMutations(); |
496 begin_main_frame_state->scroll_info = | 498 begin_main_frame_state->scroll_info = |
497 layer_tree_host_impl_->ProcessScrollDeltas(); | 499 layer_tree_host_impl_->ProcessScrollDeltas(); |
498 begin_main_frame_state->memory_allocation_limit_bytes = | 500 begin_main_frame_state->memory_allocation_limit_bytes = |
499 layer_tree_host_impl_->memory_allocation_limit_bytes(); | 501 layer_tree_host_impl_->memory_allocation_limit_bytes(); |
500 begin_main_frame_state->evicted_ui_resources = | 502 begin_main_frame_state->evicted_ui_resources = |
501 layer_tree_host_impl_->EvictedUIResourcesExist(); | 503 layer_tree_host_impl_->EvictedUIResourcesExist(); |
502 // TODO(vmpstr): This needs to be fixed if | 504 // TODO(vmpstr): This needs to be fixed if |
503 // main_frame_before_activation_enabled is set, since we might run this code | 505 // main_frame_before_activation_enabled is set, since we might run this code |
504 // twice before recording a duration. crbug.com/469824 | 506 // twice before recording a duration. crbug.com/469824 |
505 last_begin_main_frame_args_ = begin_main_frame_state->begin_frame_args; | 507 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... |
665 bool ProxyImpl::IsMainThreadBlocked() const { | 667 bool ProxyImpl::IsMainThreadBlocked() const { |
666 return task_runner_provider_->IsMainThreadBlocked(); | 668 return task_runner_provider_->IsMainThreadBlocked(); |
667 } | 669 } |
668 | 670 |
669 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 671 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
670 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 672 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
671 return main_thread_blocked_commit_vars_unsafe_; | 673 return main_thread_blocked_commit_vars_unsafe_; |
672 } | 674 } |
673 | 675 |
674 } // namespace cc | 676 } // namespace cc |
OLD | NEW |