| 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 "platform/scheduler/renderer/renderer_scheduler_impl.h" | 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 MonotonicTimeInSecondsToTimeTicks(start_time); | 1902 MonotonicTimeInSecondsToTimeTicks(start_time); |
| 1903 GetMainThreadOnly().current_task_start_time = start_time_ticks; | 1903 GetMainThreadOnly().current_task_start_time = start_time_ticks; |
| 1904 seqlock_queueing_time_estimator_.seqlock.WriteBegin(); | 1904 seqlock_queueing_time_estimator_.seqlock.WriteBegin(); |
| 1905 seqlock_queueing_time_estimator_.data.OnTopLevelTaskStarted(start_time_ticks); | 1905 seqlock_queueing_time_estimator_.data.OnTopLevelTaskStarted(start_time_ticks); |
| 1906 seqlock_queueing_time_estimator_.seqlock.WriteEnd(); | 1906 seqlock_queueing_time_estimator_.seqlock.WriteEnd(); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 void RendererSchedulerImpl::DidProcessTask(TaskQueue* task_queue, | 1909 void RendererSchedulerImpl::DidProcessTask(TaskQueue* task_queue, |
| 1910 double start_time, | 1910 double start_time, |
| 1911 double end_time) { | 1911 double end_time) { |
| 1912 DCHECK_LE(start_time, end_time); |
| 1912 // TODO(scheduler-dev): Remove conversions when Blink starts using | 1913 // TODO(scheduler-dev): Remove conversions when Blink starts using |
| 1913 // base::TimeTicks instead of doubles for time. | 1914 // base::TimeTicks instead of doubles for time. |
| 1914 base::TimeTicks start_time_ticks = | 1915 base::TimeTicks start_time_ticks = |
| 1915 MonotonicTimeInSecondsToTimeTicks(start_time); | 1916 MonotonicTimeInSecondsToTimeTicks(start_time); |
| 1916 base::TimeTicks end_time_ticks = MonotonicTimeInSecondsToTimeTicks(end_time); | 1917 base::TimeTicks end_time_ticks = MonotonicTimeInSecondsToTimeTicks(end_time); |
| 1917 | 1918 |
| 1918 seqlock_queueing_time_estimator_.seqlock.WriteBegin(); | 1919 seqlock_queueing_time_estimator_.seqlock.WriteBegin(); |
| 1919 seqlock_queueing_time_estimator_.data.OnTopLevelTaskCompleted(end_time_ticks); | 1920 seqlock_queueing_time_estimator_.data.OnTopLevelTaskCompleted(end_time_ticks); |
| 1920 seqlock_queueing_time_estimator_.seqlock.WriteEnd(); | 1921 seqlock_queueing_time_estimator_.seqlock.WriteEnd(); |
| 1921 | 1922 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 case TimeDomainType::VIRTUAL: | 2192 case TimeDomainType::VIRTUAL: |
| 2192 return "virtual"; | 2193 return "virtual"; |
| 2193 default: | 2194 default: |
| 2194 NOTREACHED(); | 2195 NOTREACHED(); |
| 2195 return nullptr; | 2196 return nullptr; |
| 2196 } | 2197 } |
| 2197 } | 2198 } |
| 2198 | 2199 |
| 2199 } // namespace scheduler | 2200 } // namespace scheduler |
| 2200 } // namespace blink | 2201 } // namespace blink |
| OLD | NEW |