| 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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_IDLE_TIME_ESTIMATO
R_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_IDLE_TIME_ESTIMATO
R_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_IDLE_TIME_ESTIMATO
R_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_IDLE_TIME_ESTIMATO
R_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 void DidCommitFrameToCompositor(); | 34 void DidCommitFrameToCompositor(); |
| 35 | 35 |
| 36 void Clear(); | 36 void Clear(); |
| 37 | 37 |
| 38 // TaskObserver implementation: | 38 // TaskObserver implementation: |
| 39 void WillProcessTask(const base::PendingTask& pending_task) override; | 39 void WillProcessTask(const base::PendingTask& pending_task) override; |
| 40 void DidProcessTask(const base::PendingTask& pending_task) override; | 40 void DidProcessTask(const base::PendingTask& pending_task) override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 scoped_refptr<TaskQueue> compositor_task_runner_; | 43 scoped_refptr<TaskQueue> compositor_task_queue_; |
| 44 cc::RollingTimeDeltaHistory per_frame_compositor_task_runtime_; | 44 cc::RollingTimeDeltaHistory per_frame_compositor_task_runtime_; |
| 45 base::TickClock* time_source_; // NOT OWNED | 45 base::TickClock* time_source_; // NOT OWNED |
| 46 double estimation_percentile_; | 46 double estimation_percentile_; |
| 47 | 47 |
| 48 base::TimeTicks task_start_time_; | 48 base::TimeTicks task_start_time_; |
| 49 base::TimeTicks prev_commit_time_; | 49 base::TimeTicks prev_commit_time_; |
| 50 base::TimeDelta cumulative_compositor_runtime_; | 50 base::TimeDelta cumulative_compositor_runtime_; |
| 51 int nesting_level_; | 51 int nesting_level_; |
| 52 bool did_commit_; | 52 bool did_commit_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(IdleTimeEstimator); | 54 DISALLOW_COPY_AND_ASSIGN(IdleTimeEstimator); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace scheduler | 57 } // namespace scheduler |
| 58 } // namespace blink | 58 } // namespace blink |
| 59 | 59 |
| 60 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_IDLE_TIME_ESTIM
ATOR_H_ | 60 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_IDLE_TIME_ESTIM
ATOR_H_ |
| OLD | NEW |