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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2895673002: [scheduler] Add unthrottled-by-blockable task queue to fix touch latency regression. (Closed)
Patch Set: Address comments and disable a failing test Created 3 years, 6 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 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 TimeDomainType::VIRTUAL; 1161 TimeDomainType::VIRTUAL;
1162 new_policy.default_queue_policy.time_domain_type = TimeDomainType::VIRTUAL; 1162 new_policy.default_queue_policy.time_domain_type = TimeDomainType::VIRTUAL;
1163 new_policy.loading_queue_policy.time_domain_type = TimeDomainType::VIRTUAL; 1163 new_policy.loading_queue_policy.time_domain_type = TimeDomainType::VIRTUAL;
1164 new_policy.timer_queue_policy.time_domain_type = TimeDomainType::VIRTUAL; 1164 new_policy.timer_queue_policy.time_domain_type = TimeDomainType::VIRTUAL;
1165 } 1165 }
1166 1166
1167 new_policy.should_disable_throttling = 1167 new_policy.should_disable_throttling =
1168 ShouldDisableThrottlingBecauseOfAudio(now) || 1168 ShouldDisableThrottlingBecauseOfAudio(now) ||
1169 GetMainThreadOnly().use_virtual_time; 1169 GetMainThreadOnly().use_virtual_time;
1170 1170
1171 // TODO(altimin): Consider adding default timer tq to background time
1172 // budget pool.
1173 if (GetMainThreadOnly().renderer_backgrounded &&
1174 RuntimeEnabledFeatures::timerThrottlingForBackgroundTabsEnabled()) {
1175 new_policy.timer_queue_policy.time_domain_type = TimeDomainType::THROTTLED;
1176 }
1177
1178 // Tracing is done before the early out check, because it's quite possible we 1171 // Tracing is done before the early out check, because it's quite possible we
1179 // will otherwise miss this information in traces. 1172 // will otherwise miss this information in traces.
1180 CreateTraceEventObjectSnapshotLocked(); 1173 CreateTraceEventObjectSnapshotLocked();
1181 TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"), "use_case", 1174 TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"), "use_case",
1182 use_case); 1175 use_case);
1183 TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"), "rail_mode", 1176 TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"), "rail_mode",
1184 new_policy.rail_mode); 1177 new_policy.rail_mode);
1185 TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"), 1178 TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"),
1186 "touchstart_expected_soon", 1179 "touchstart_expected_soon",
1187 GetMainThreadOnly().touchstart_expected_soon); 1180 GetMainThreadOnly().touchstart_expected_soon);
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 case TimeDomainType::VIRTUAL: 2050 case TimeDomainType::VIRTUAL:
2058 return "virtual"; 2051 return "virtual";
2059 default: 2052 default:
2060 NOTREACHED(); 2053 NOTREACHED();
2061 return nullptr; 2054 return nullptr;
2062 } 2055 }
2063 } 2056 }
2064 2057
2065 } // namespace scheduler 2058 } // namespace scheduler
2066 } // namespace blink 2059 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698