| 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 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ | 5 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
| 6 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ | 6 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "cc/base/rolling_time_delta_history.h" | 11 #include "cc/base/rolling_time_delta_history.h" |
| 11 | 12 |
| 12 namespace base { | 13 namespace base { |
| 13 namespace trace_event { | 14 namespace trace_event { |
| 14 class TracedValue; | 15 class TracedValue; |
| 15 } // namespace trace_event | 16 } // namespace trace_event |
| 16 } // namespace base | 17 } // namespace base |
| 17 | 18 |
| 18 namespace cc { | 19 namespace cc { |
| 19 | 20 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 79 |
| 79 protected: | 80 protected: |
| 80 void DidBeginMainFrame(); | 81 void DidBeginMainFrame(); |
| 81 | 82 |
| 82 void SetBeginMainFrameNeededContinuously(bool active); | 83 void SetBeginMainFrameNeededContinuously(bool active); |
| 83 void SetBeginMainFrameCommittingContinuously(bool active); | 84 void SetBeginMainFrameCommittingContinuously(bool active); |
| 84 void SetCompositorDrawingContinuously(bool active); | 85 void SetCompositorDrawingContinuously(bool active); |
| 85 | 86 |
| 86 bool ShouldReportUma() const; | 87 bool ShouldReportUma() const; |
| 87 | 88 |
| 88 static scoped_ptr<UMAReporter> CreateUMAReporter(UMACategory category); | 89 static std::unique_ptr<UMAReporter> CreateUMAReporter(UMACategory category); |
| 89 virtual base::TimeTicks Now() const; | 90 virtual base::TimeTicks Now() const; |
| 90 | 91 |
| 91 bool using_synchronous_renderer_compositor_; | 92 bool using_synchronous_renderer_compositor_; |
| 92 bool enabled_; | 93 bool enabled_; |
| 93 | 94 |
| 94 // Used to limit the recorded UMA data to once every N frames. | 95 // Used to limit the recorded UMA data to once every N frames. |
| 95 int draw_count_; | 96 int draw_count_; |
| 96 | 97 |
| 97 // Used to calculate frame rates of Main and Impl threads. | 98 // Used to calculate frame rates of Main and Impl threads. |
| 98 bool did_send_begin_main_frame_; | 99 bool did_send_begin_main_frame_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 118 base::TimeTicks begin_main_frame_sent_time_; | 119 base::TimeTicks begin_main_frame_sent_time_; |
| 119 base::TimeTicks begin_main_frame_start_time_; | 120 base::TimeTicks begin_main_frame_start_time_; |
| 120 base::TimeTicks begin_main_frame_end_time_; | 121 base::TimeTicks begin_main_frame_end_time_; |
| 121 base::TimeTicks pending_tree_main_frame_time_; | 122 base::TimeTicks pending_tree_main_frame_time_; |
| 122 base::TimeTicks prepare_tiles_start_time_; | 123 base::TimeTicks prepare_tiles_start_time_; |
| 123 base::TimeTicks activate_start_time_; | 124 base::TimeTicks activate_start_time_; |
| 124 base::TimeTicks active_tree_main_frame_time_; | 125 base::TimeTicks active_tree_main_frame_time_; |
| 125 base::TimeTicks draw_start_time_; | 126 base::TimeTicks draw_start_time_; |
| 126 base::TimeTicks swap_start_time_; | 127 base::TimeTicks swap_start_time_; |
| 127 | 128 |
| 128 scoped_ptr<UMAReporter> uma_reporter_; | 129 std::unique_ptr<UMAReporter> uma_reporter_; |
| 129 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 130 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 130 | 131 |
| 131 private: | 132 private: |
| 132 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory); | 133 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory); |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 } // namespace cc | 136 } // namespace cc |
| 136 | 137 |
| 137 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ | 138 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
| OLD | NEW |