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

Unified Diff: components/scheduler/renderer/renderer_scheduler_impl.h

Issue 1303353003: scheduler: Disable expensive timers during main thread user input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 5 years, 4 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 | « components/scheduler/renderer/DEPS ('k') | components/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/renderer/renderer_scheduler_impl.h
diff --git a/components/scheduler/renderer/renderer_scheduler_impl.h b/components/scheduler/renderer/renderer_scheduler_impl.h
index ae7343cfff4eddae0684ec0622268871a992646a..14693460eba115a9d9d1438d7e528d1c0f75fb48 100644
--- a/components/scheduler/renderer/renderer_scheduler_impl.h
+++ b/components/scheduler/renderer/renderer_scheduler_impl.h
@@ -12,6 +12,7 @@
#include "components/scheduler/child/scheduler_helper.h"
#include "components/scheduler/renderer/deadline_task_runner.h"
#include "components/scheduler/renderer/renderer_scheduler.h"
+#include "components/scheduler/renderer/task_cost_estimator.h"
#include "components/scheduler/scheduler_export.h"
namespace base {
@@ -198,10 +199,14 @@ class SCHEDULER_EXPORT RendererSchedulerImpl : public RendererScheduler,
struct MainThreadOnly {
MainThreadOnly();
+ ~MainThreadOnly();
+ TaskCostEstimator timer_task_cost_estimator_;
+ cc::RollingTimeDeltaHistory short_idle_period_duration_;
Policy current_policy_;
base::TimeTicks current_policy_expiration_time_;
base::TimeTicks estimated_next_frame_begin_;
+ base::TimeDelta expected_short_idle_period_duration_;
int timer_queue_suspend_count_; // TIMER_TASK_QUEUE suspended if non-zero.
bool renderer_hidden_;
bool was_shutdown_;
@@ -217,6 +222,7 @@ class SCHEDULER_EXPORT RendererSchedulerImpl : public RendererScheduler,
bool awaiting_touch_start_response_;
bool in_idle_period_;
bool begin_main_frame_on_critical_path_;
+ bool timer_tasks_seem_expensive_;
};
struct CompositorThreadOnly {
« no previous file with comments | « components/scheduler/renderer/DEPS ('k') | components/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698