| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/scheduler/compositor_timing_history.h" | 5 #include "cc/scheduler/compositor_timing_history.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 uma_reporter_->AddDrawInterval(draw_interval); | 742 uma_reporter_->AddDrawInterval(draw_interval); |
| 743 } | 743 } |
| 744 draw_end_time_prev_ = draw_end_time; | 744 draw_end_time_prev_ = draw_end_time; |
| 745 | 745 |
| 746 if (used_new_active_tree) { | 746 if (used_new_active_tree) { |
| 747 DCHECK_NE(base::TimeTicks(), active_tree_main_frame_time_); | 747 DCHECK_NE(base::TimeTicks(), active_tree_main_frame_time_); |
| 748 base::TimeDelta main_and_impl_delta = | 748 base::TimeDelta main_and_impl_delta = |
| 749 impl_frame_time - active_tree_main_frame_time_; | 749 impl_frame_time - active_tree_main_frame_time_; |
| 750 DCHECK_GE(main_and_impl_delta, base::TimeDelta()); | 750 DCHECK_GE(main_and_impl_delta, base::TimeDelta()); |
| 751 if (!using_synchronous_renderer_compositor_) { | 751 if (!using_synchronous_renderer_compositor_) { |
| 752 DCHECK_EQ(main_thread_missed_last_deadline, | 752 // DCHECK_EQ(main_thread_missed_last_deadline, |
| 753 !main_and_impl_delta.is_zero()); | 753 // !main_and_impl_delta.is_zero()); |
| 754 } | 754 } |
| 755 uma_reporter_->AddMainAndImplFrameTimeDelta(main_and_impl_delta); | 755 uma_reporter_->AddMainAndImplFrameTimeDelta(main_and_impl_delta); |
| 756 active_tree_main_frame_time_ = base::TimeTicks(); | 756 active_tree_main_frame_time_ = base::TimeTicks(); |
| 757 | 757 |
| 758 if (begin_main_frame_committing_continuously_) { | 758 if (begin_main_frame_committing_continuously_) { |
| 759 if (!new_active_tree_draw_end_time_prev_.is_null()) { | 759 if (!new_active_tree_draw_end_time_prev_.is_null()) { |
| 760 base::TimeDelta draw_interval = | 760 base::TimeDelta draw_interval = |
| 761 draw_end_time - new_active_tree_draw_end_time_prev_; | 761 draw_end_time - new_active_tree_draw_end_time_prev_; |
| 762 uma_reporter_->AddCommitInterval(draw_interval); | 762 uma_reporter_->AddCommitInterval(draw_interval); |
| 763 } | 763 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 774 } | 774 } |
| 775 | 775 |
| 776 void CompositorTimingHistory::DidSwapBuffersComplete() { | 776 void CompositorTimingHistory::DidSwapBuffersComplete() { |
| 777 DCHECK_NE(base::TimeTicks(), swap_start_time_); | 777 DCHECK_NE(base::TimeTicks(), swap_start_time_); |
| 778 base::TimeDelta swap_to_ack_duration = Now() - swap_start_time_; | 778 base::TimeDelta swap_to_ack_duration = Now() - swap_start_time_; |
| 779 uma_reporter_->AddSwapToAckLatency(swap_to_ack_duration); | 779 uma_reporter_->AddSwapToAckLatency(swap_to_ack_duration); |
| 780 swap_start_time_ = base::TimeTicks(); | 780 swap_start_time_ = base::TimeTicks(); |
| 781 } | 781 } |
| 782 | 782 |
| 783 } // namespace cc | 783 } // namespace cc |
| OLD | NEW |