OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/profiler/scoped_tracker.h" | 8 #include "base/profiler/scoped_tracker.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/debug/benchmark_instrumentation.h" | 10 #include "cc/debug/benchmark_instrumentation.h" |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
709 "461509 SingleThreadProxy::DoComposite4")); | 709 "461509 SingleThreadProxy::DoComposite4")); |
710 layer_tree_host_impl_->DidDrawAllLayers(*frame); | 710 layer_tree_host_impl_->DidDrawAllLayers(*frame); |
711 | 711 |
712 bool start_ready_animations = draw_frame; | 712 bool start_ready_animations = draw_frame; |
713 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 | 713 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 |
714 // is fixed. | 714 // is fixed. |
715 tracked_objects::ScopedTracker tracking_profile5( | 715 tracked_objects::ScopedTracker tracking_profile5( |
716 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 716 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
717 "461509 SingleThreadProxy::DoComposite5")); | 717 "461509 SingleThreadProxy::DoComposite5")); |
718 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); | 718 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); |
719 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 | |
720 // is fixed. | |
721 tracked_objects::ScopedTracker tracking_profile6( | |
722 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
723 "461509 SingleThreadProxy::DoComposite6")); | |
724 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | |
725 | 719 |
726 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 | 720 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 |
727 // is fixed. | 721 // is fixed. |
728 tracked_objects::ScopedTracker tracking_profile7( | 722 tracked_objects::ScopedTracker tracking_profile7( |
sunnyps
2015/05/01 00:31:44
tracking_profile6?
mithro-old
2015/05/01 02:52:35
I didn't want to modify the other tracking profile
| |
729 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 723 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
730 "461509 SingleThreadProxy::DoComposite7")); | 724 "461509 SingleThreadProxy::DoComposite7")); |
731 timing_history_.DidFinishDrawing(); | 725 timing_history_.DidFinishDrawing(); |
732 } | 726 } |
733 | 727 |
734 if (draw_frame) { | 728 if (draw_frame) { |
735 DebugScopedSetImplThread impl(this); | 729 DebugScopedSetImplThread impl(this); |
736 | 730 |
737 // This CapturePostTasks should be destroyed before | 731 // This CapturePostTasks should be destroyed before |
738 // DidCommitAndDrawFrame() is called since that goes out to the | 732 // DidCommitAndDrawFrame() is called since that goes out to the |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
961 | 955 |
962 base::TimeDelta SingleThreadProxy::BeginMainFrameToCommitDurationEstimate() { | 956 base::TimeDelta SingleThreadProxy::BeginMainFrameToCommitDurationEstimate() { |
963 return timing_history_.BeginMainFrameToCommitDurationEstimate(); | 957 return timing_history_.BeginMainFrameToCommitDurationEstimate(); |
964 } | 958 } |
965 | 959 |
966 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { | 960 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { |
967 return timing_history_.CommitToActivateDurationEstimate(); | 961 return timing_history_.CommitToActivateDurationEstimate(); |
968 } | 962 } |
969 | 963 |
970 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 964 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
971 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 965 layer_tree_host_impl_->DidBeginImplFrameDeadline(); |
972 } | 966 } |
973 | 967 |
974 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 968 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
975 layer_tree_host_->SendBeginFramesToChildren(args); | 969 layer_tree_host_->SendBeginFramesToChildren(args); |
976 } | 970 } |
977 | 971 |
978 } // namespace cc | 972 } // namespace cc |
OLD | NEW |