Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: components/scheduler/renderer/task_cost_estimator.cc

Issue 1320633002: Optimize for TouchStart responsiveness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try set OnPageLoadStarted in RenderFrameImpl::OnNavigate Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "components/scheduler/renderer/task_cost_estimator.h" 5 #include "components/scheduler/renderer/task_cost_estimator.h"
6 6
7 namespace scheduler { 7 namespace scheduler {
8 8
9 TaskCostEstimator::TaskCostEstimator(int sample_count, 9 TaskCostEstimator::TaskCostEstimator(int sample_count,
10 double estimation_percentile) 10 double estimation_percentile)
(...skipping 17 matching lines...) Expand all
28 // TODO(skyostil): Should we do this less often? 28 // TODO(skyostil): Should we do this less often?
29 expected_task_duration_ = 29 expected_task_duration_ =
30 rolling_time_delta_history_.Percentile(estimation_percentile_); 30 rolling_time_delta_history_.Percentile(estimation_percentile_);
31 } 31 }
32 } 32 }
33 33
34 base::TimeTicks TaskCostEstimator::Now() { 34 base::TimeTicks TaskCostEstimator::Now() {
35 return base::TimeTicks::Now(); 35 return base::TimeTicks::Now();
36 } 36 }
37 37
38 void TaskCostEstimator::Clear() {
39 rolling_time_delta_history_.Clear();
40 expected_task_duration_ = base::TimeDelta();
41 }
42
38 } // namespace scheduler 43 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/renderer/task_cost_estimator.h ('k') | components/scheduler/renderer/task_cost_estimator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698