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

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

Issue 1617013002: scheduler: Disable expensive task blocking policy in M48 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | components/scheduler/renderer/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "components/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/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 block_expensive_loading_tasks = false; 708 block_expensive_loading_tasks = false;
709 block_expensive_timer_tasks = false; 709 block_expensive_timer_tasks = false;
710 } 710 }
711 711
712 // Don't block expensive tasks if we are expecting a navigation. 712 // Don't block expensive tasks if we are expecting a navigation.
713 if (MainThreadOnly().navigation_task_expected_count > 0) { 713 if (MainThreadOnly().navigation_task_expected_count > 0) {
714 block_expensive_loading_tasks = false; 714 block_expensive_loading_tasks = false;
715 block_expensive_timer_tasks = false; 715 block_expensive_timer_tasks = false;
716 } 716 }
717 717
718 // Expensive task blocking is currently disabled (crbug.com/574343).
719 block_expensive_loading_tasks = false;
720 block_expensive_timer_tasks = false;
721
718 // Only block expensive tasks if we have seen a touch start, i.e. don't block 722 // Only block expensive tasks if we have seen a touch start, i.e. don't block
719 // expensive timers on desktop because it's causing too many problems with 723 // expensive timers on desktop because it's causing too many problems with
720 // legitimate webcontent using mousehandlers for various things. 724 // legitimate webcontent using mousehandlers for various things.
721 // See http://crbug.com/570845 and http://crbug.com/570845 for details. 725 // See http://crbug.com/570845 and http://crbug.com/570845 for details.
722 // TODO(alexclarke): Revisit the throttling decisions and mechanism. 726 // TODO(alexclarke): Revisit the throttling decisions and mechanism.
723 if (!AnyThread().have_seen_touchstart) { 727 if (!AnyThread().have_seen_touchstart) {
724 block_expensive_loading_tasks = false; 728 block_expensive_loading_tasks = false;
725 block_expensive_timer_tasks = false; 729 block_expensive_timer_tasks = false;
726 } 730 }
727 731
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 double RendererSchedulerImpl::CurrentTimeSeconds() const { 1056 double RendererSchedulerImpl::CurrentTimeSeconds() const {
1053 return helper_.scheduler_tqm_delegate()->CurrentTimeSeconds(); 1057 return helper_.scheduler_tqm_delegate()->CurrentTimeSeconds();
1054 } 1058 }
1055 1059
1056 double RendererSchedulerImpl::MonotonicallyIncreasingTimeSeconds() const { 1060 double RendererSchedulerImpl::MonotonicallyIncreasingTimeSeconds() const {
1057 return helper_.scheduler_tqm_delegate()->NowTicks().ToInternalValue() / 1061 return helper_.scheduler_tqm_delegate()->NowTicks().ToInternalValue() /
1058 static_cast<double>(base::Time::kMicrosecondsPerSecond); 1062 static_cast<double>(base::Time::kMicrosecondsPerSecond);
1059 } 1063 }
1060 1064
1061 } // namespace scheduler 1065 } // namespace scheduler
OLDNEW
« no previous file with comments | « no previous file | components/scheduler/renderer/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698