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

Unified Diff: cc/scheduler/scheduler.cc

Issue 2354673003: Add setting to disable latency recovery for tests (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index a1a4c7b46e3be9c7af502a8a76bed946b4abfa3a..f07488e7610b0174089ec64f442223afcc99aa98 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -756,6 +756,9 @@ bool Scheduler::ShouldRecoverMainLatency(
bool can_activate_before_deadline) const {
DCHECK(!settings_.using_synchronous_renderer_compositor);
+ if (!settings_.enable_latency_recovery)
+ return false;
+
// The main thread is in a low latency mode and there's no need to recover.
if (!state_machine_.main_thread_missed_last_deadline())
return false;
@@ -773,6 +776,9 @@ bool Scheduler::ShouldRecoverImplLatency(
bool can_activate_before_deadline) const {
DCHECK(!settings_.using_synchronous_renderer_compositor);
+ if (!settings_.enable_latency_recovery)
+ return false;
+
// Disable impl thread latency recovery when using the unthrottled
// begin frame source since we will always get a BeginFrame before
// the swap ack and our heuristics below will not work.
« no previous file with comments | « no previous file | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698